Preheat oven to 400 degrees Fahrenheit. Line a rimmed baking sheet with parchment paper.
Heat olive oil in a large nonstick skillet. Add leeks and onions and season with salt and pepper. Allow leeks and onions to caramelize over medium low heat, stirring occasionally, for about 10 to 15 minutes. Add the zucchini and cook vegetables for another 5 minutes until the zucchini is softened. Add the greens and cook them down until wilted. Taste and adjust seasoning. Set aside to cool slightly while prepping the puff pastry.
In a small bowl whisk together the prepared pesto and ricotta until well combined. Set aside.
Take out the sheet of puff pastry and place it on the parchment lined baking sheet. Lightly flour a rolling pin and gently roll out the puff pastry into a 12x24” sheet. Using a sharp knife or pizza cutter, slice the rectangle in fourths. Use a sharp paring knife to score a ½ inch border around the puff pastry.
Evenly distribute the ricotta-pesto mixture across the four puff pastry using a spoon or spatula. Top each puff pastry with a couple tablespoons of the vegetables (you will have vegetables left over; see notes for tips on what to do with them).
Prepare your egg wash by whisking together 1 tablespoon water with 1 cracked egg. Brush the edges of the puff pastry with the egg wash.
Bake in 400 degree oven for 25-30 minutes until edges are a golden brown and the bottom of each puff pastry is golden and cooked through. Garnish with freshly chopped basil, crushed red pepper flakes, and grated parmesan. If you have a good syrupy balsamic vinegar, that is good here too.