Preheat oven to 375°F.
On a floured surface, roll out puff pastry dough into a large rectangle.
Using a dough scraper press a line along the entire perimeter of the puff pastry about an inch from the edges, being careful not to cut all the way through the dough.
Use a fork to prick the center of the dough. Do not prick the outside edges/border of the dough. Set aside.
Heat butter in a large skillet over medium heat.
Saute shopped shallot until soft and translucent.
Add thyme and garlic to the skillet. Sauté until garlic is fragrant, about 1-2 minutes.
Remove from pan and set aside.
Add more butter to the skillet and sauté mushrooms until they released their liquid. Continue to cook until liquid evaporates.
Return cooked shallot mixture to the pan and stir to combine with the mushrooms.
Continue to cook until all liquid has evaporated.
Add balsamic vinegar to the pan and stir to combine. Remove from heat.
Top prepared puff pastry with an even layer of the shredded Havarti cheese.
Top the cheese with the sautéed mushrooms.
Add a layer of grated parmesan cheese on top.
Brush edges of pastry with beaten egg.
Bake tart in preheated oven for 20-25 minutes or until cheese is melted and bubbly, and pastry edges are puffed and golden brown.
Cut tart into squares. Serve hot.