Prepare the Oven: Preheat the oven to 400°F and line a large baking sheet with parchment paper.
Sauté the Shallot: Heat 1 tablespoon of the olive oil in a large skillet over medium heat, then add the thinly sliced shallot and cook for about 3 minutes, until lightly browned.
Cook the Mushrooms: Add the sliced mushrooms, 1/4 teaspoon of the salt, and black pepper to the skillet, then cook for about 15 minutes, stirring as needed, until the mushroom liquid has cooked off and the mushrooms are browned.
Add Garlic and Thyme: Stir the minced garlic and thyme into the browned mushrooms and cook for 1 additional minute, until fragrant. Remove the mushroom mixture from the heat and allow it to cool slightly. Make the Ricotta Layer: In a bowl, combine the ricotta, 1/4 cup of the shredded Parmesan, the remaining 1 tablespoon olive oil, the remaining 1/4 teaspoon salt, and black pepper to taste.
Roll the Pastry: Place the thawed puff pastry on a lightly floured surface and roll it out slightly to smooth away the creases. A sheet measuring about 10 × 10 inches can be rolled to approximately 11 × 12 inches, although the exact dimensions can vary by brand. Create the Pastry Border: Use a small knife to lightly score a rectangle about 1/2 inch from the outer edge of the puff pastry, creating an inner rectangle without cutting completely through the pastry.
Prick the Pastry: Use a fork to evenly poke holes throughout the inside scored rectangle, leaving the outer border intact.
Add the Cheese Base: Spread the ricotta mixture evenly across the inside rectangle of the puff pastry.
Layer the Mozzarella: Sprinkle the mozzarella evenly over the ricotta mixture.
Add the Mushrooms: Distribute the slightly cooled mushroom mixture evenly over the cheese layer.
Finish with Parmesan: Sprinkle the remaining 1/4 cup of shredded Parmesan evenly over the mushrooms.
Prepare the Egg Wash: Whisk the egg together with 1 tablespoon of water until combined.
Brush the Pastry: Use a pastry brush to lightly coat the exposed puff pastry edges with the egg mixture.
Bake the Tart: Transfer the prepared tart to the preheated 400°F oven and bake for 20–23 minutes, until the pastry edges are deep golden brown.
Cool and Serve: Allow the tart to cool slightly before serving, or let it come to room temperature and serve then.