Place the grated zucchini in a large colander, sprinkle with 1½ tsp salt, and set over the sink for 20 minutes.
Squeeze out as much liquid as you can using your hands, then wrap the zucchini in a clean tea towel and wring it tightly.
Transfer zucchini to a large bowl. Add cheddar, ricotta, shallots, herbs, eggs, and lemon zest. Season to taste and mix well.
Cut a 20cm round from each pastry sheet and place on a tray to soften slightly.
Preheat the oven to 200°C and line two large baking trays with baking paper.
Spoon the zucchini filling onto the centre of each pastry round, leaving a 5cm border. Fold the edges over to partly cover the filling, crimping slightly.
Brush pastry with egg wash and sprinkle with pistachios.
Bake for 25 minutes or until the pastry is golden and crisp.