Put the flour and butter into a bowl. Rub together quickly and efficiently until you have something resembling fine breadcrumbs. You can do this by pulsing in a food processor, if you prefer.
Add the 2 tbsp of the water and cut the liquid through the crumb with a cutlery knife. If it still seems really dry, add another drop or two but try not to add more as a wet dough may result in a tough pastry or a soggy bottom.
Shape the pastry quickly into a flat disc, wrap and pop in the fridge for at least 10 minutes to firm up.
Preheat the oven to 210C (190C fan-assisted).
Roll out the pastry so that it’s 3-5cm (1-2 inches) wider than your tin. Lift it into the tin, press into the corners so that there are no air gaps. Roll a rolling pin over the top of the tin to trim off the excess.
Scrunch up some baking paper and use it to closely line the inside of the pastry case.
Fill the paper with baking beans making sure to work them into the corners.
Place the tin in the oven and bake for 15 minutes. Lift out the baking paper with the beans (careful, they’ll be very hot) and have a look at your pastry. It should look dry at the sides but will probably still be a bit doughy on the base.
Return to the oven for a further 5 minutes until it looks dry all the way across. If there are any air bubbles on the base, you can gently smooth them down with the back of a spoon.
Make the filling
Lower the oven temperature to 190C (fan 170C) and place a flat tray on the shelf (this will help ensure the base is well crisped.
Spread the red onion and chestnuts evenly on the bottom of the pastry case.
Sprinkle the grated cheese on top, then the rosemary and a good pinch of salt and pepper.
In a jug, beat the eggs and milk together.
Pour the egg mixture into the case. Depending on the size of your tin, you might not need all of the egg and milk mixture. Don't fill it closer than a centimetre or so (half inch) from the top.
Bake for 45-60 minutes until the pastry is crisp and golden and the quiche feels set to the centre if gently pressed with a finger tip.
Place the flan tin on a can and the sides should drop away. Transfer the quiche to a cooling rack.