To make the Crust: In a medium size mixing bowl, whisk together flour and salt. Using a pastry blender, cut the butter into the flour until the mixture is crumbly and the size of small peas. Drizzle in 5 tablespoons of water, stirring gently until everything is evenly moistened; add the final tablespoon of water if necessary to make a cohesive dough. Pat the dough into a disk, wrap in plastic wrap and refrigerate for 30 minutes.
To make the Filling: Heat the butter in a large pot set over medium heat. Add the onions, salt, sugar, pepper, garlic and thyme. Cook uncovered, stirring occasionally, until the onions cook down by half and are golden brown and tender, about 35-45 minutes. Add the balsamic vinegar and stir to combine cooking just until evaporated. Remove from the heat and let cool.
To assemble the Tart: Preheat the oven to 400°F line a large baking sheet with parchment, On a lightly floured work surface, roll the pie dough into a 12" circle. Trim edge lightly to make even, if needed. Transfer the dough to prepared parchment-lined baking sheet.
Mix together Dijon and cream cheese. Spread on pie dough, leaving a 2-inch border. Sprinkle with 1 cup shredded cheese.
Spoon cooled onions over cheese then sprinkle top with reserved 1 cup shredded cheese.
Gently fold the outer edges of the dough over the filling to create a freeform crust. Brush the dough on all sides with the beaten egg then sprinkle Parmesan all over onions and crust.
Bake for 30-40 minutes or until the dough is golden brown and set on the bottom.
Let stand for 5-10 minutes, then slice into wedges and serve garnished with fresh thyme.