Preheat the oven to 350° F.
Prep the puff pastry: Thaw the puff pastry according to package directions. Lightly flour your work surface, then roll the pastry into a circle or rectangle large enough to fit your pie dish. Place it into the dish, gently pressing it into the bottom and sides. Trim or fold over any excess edges.
Parbake the crust: Line the puff pastry with parchment paper or foil and fill with pie weights or dried beans. Bake for about 20 minutes, until lightly golden. Remove from the oven, carefully lift out the weights, and let the crust cool for 5 minutes.
Prepare the zucchini: Slice the zucchini into thin rounds. Lay the slices on a paper towel–lined baking sheet and sprinkle lightly with salt. Let them sit for 10–15 minutes, then blot with another paper towel to remove excess moisture. This step helps keep the pie from turning soggy.
Prepare the tomatoes: Slice the tomatoes into thin rounds. Place them on paper towels and gently blot to remove moisture. For very juicy heirloom tomatoes, blot twice to ensure the crust stays crisp.
Make the herb ricotta filling: In a medium bowl, combine the ricotta cheese, Parmesan, oregano (or fresh thyme), salt, and pepper. Stir until creamy and smooth. This filling is the heart of the pie, giving it that signature Tomato Ricotta Pie flavor.
Assemble the pie: Spread the ricotta mixture evenly over the parbaked crust. Arrange the zucchini and tomato slices on top in alternating layers or a spiral pattern for a pretty finish. Sprinkle with Gruyere and parmesan cheese.
Bake: Return the pie to the oven and bake for 50 minutes until the pastry is golden brown, the ricotta filling is set, and the cheese on top is melted and bubbly.
Finish & serve: Remove from the oven and let cool for 5–10 minutes before slicing. Garnish with fresh basil if desired, then serve warm or at room temperature.