Preheat the oven to 400F. Line a large baking sheet with parchment paper.
In a large skillet, heat 1 tablespoon of olive oil over medium heat. Add shallots and cook until lightly browned, about 3 minutes.
Add sliced mushrooms and ¼ teaspoon of salt and pepper to the pan, and cook until liquid has cooked off and the mushrooms have browned, about 15 minutes.
Add the garlic and thyme and stir to combine. Cook 1 more minute, until fragrant. Set aside to cool slightly.
Combine ricotta cheese, a ¼ cup of the Parmesan, the remaining tablespoon of olive oil, and ¼ teaspoon salt, and pepper to taste.
On a floured surface, roll the puff pastry out a little, ironing out the creases. From a 10x10 inch square, I roll out to about 11x12, give or take. Puff pastry sheets vary in size depending on the brand, so don’t worry too much about the exact proportions.
Using a small knife, lightly score the puff pastry, a ½ inch from the edge, making a smaller rectangle on the inside to create an edge. Poke the inside rectangle all over, evenly, with a fork.
Spread the ricotta mixture evenly over the inside rectangle. Sprinkle evenly with the mozzarella. Cover with the mushroom mixture and sprinkle with the remaining ¼ cup of parmesan cheese.
Whisk together the egg and 1 tablespoon of water and brush the edges of the tart with the mixture.
Bake in the preheated oven 20-23 mins until the edges are deep golden brown. Let cool slightly before serving, or serve at room temperature.