Place a large sauté pan on medium–high heat and sauté the onion, celery, chard, garlic, mint, parsley and sage in the olive oil. Cook, stirring continuously, for 15 minutes or until the greens have wilted and the celery has softened completely. Remove from the heat and stir through the feta, pecorino, pine nuts, lemon zest, ¼ teaspoon of salt and a hearty grind of black pepper. Leave aside to cool.
Preheat the oven to 220°C/200°C Fan/Gas Mark 7.
Roll out the pastry on a floured work surface until 3mm thick, then cut it into a circle, approximately 30 cm in diameter. Place on an oven tray lined with baking parchment. Spread the filling out on the pastry leaving a 3 cm border all the way around. Dot the filling with large chunks of brocciu or ricotta and top with courgette flowers or courgette strips, if using. Bring the pastry up around the sides of the filling and pinch the edges together firmly to form a secure, decorative lip over the edge of the tart. Alternatively, press with the end of a fork. Brush the pastry with egg and refrigerate for 10 minutes.
Bake the tart for 30 minutes, until the pastry is golden and cooked on the base. Remove from the oven and brush with a little olive oil. Serve warm or at room temperature.