Preheat the oven to 200C/400F/Gas 6.
Line a 20cm/8in tart tin (3.5cm/1¼in deep) with the pastry, then place in the fridge for 30 minutes.
Line the pastry with baking parchment and fill with baking beans. Bake in the oven for 10-15 minutes, or until the pastry is dry.
Remove the baking parchment and beans and return the pastry case to the oven for a further 3-5 minutes, or until the pastry is a pale golden-brown and just cooked.
Turn the oven down to 180C/350F/Gas 4.
Heat a frying pan until hot. Add the butter and courgettes and cook until golden-brown. Season with salt and black pepper, then drain through a sieve to remove any excess moisture.
Blanch the broccoli in a pan of boiling water for 1-2 minutes, or until just cooked. Drain, then refresh in a bowl of ice-cold water and drain once more. Add to the cooked courgettes and toss to combine. Scatter over the bottom of the pastry case.
Place the eggs and milk in a bowl, season with salt and black pepper and whisk well. Add half the cheese and whisk once more.
Pour over the egg and milk mixture on top of the vegetables in the pastry case, then scatter the remaining cheese over the top.
Bake in the oven for 40-45 minutes, or until golden-brown, bubbling and just set.
Set aside to cool slightly before serving.