1. Make the pastry. Tip the flour into a food processor. Add 85g sugar, a pinch of salt, and chop in the butter. Whizz together to make a fine, sandy textured mixture. No processor? Put all the dry ingredients in a bowl and rub the butter in with your fingertips to make crumbs.
2. Whisk 2 of the egg yolks with 2 tbsp cold water. Add to the flour and pulse (or stir together with fork), then keep adding more water (if necessary) till the pastry comes together. Turn out and knead gently to make a smooth, round ball. Wrap and chill in the fridge for 30 mins-overnight.
3. Bring a large pan of water to the boil. Halve the squash or pumpkin, if necessary. Peel and scoop out the seeds. Chop into small chunks, around 2cm across. Add the squash to the boiling water. Simmer for 15-20 mins till the squash/pumpkin is tender when you push in a skewer. Drain and leave in the colander to make sure as much water drains off as possible.
4. While the squash cooks, dust your work surface with a little flour. Roll out the pastry to make a 30cm-wide circle. Roll it around your rolling pin and use it to line a deep 28cm loose-bottomed tart tin. Chill in the fridge for 30 mins.
5. Preheat your oven to 180°C/Fan 160°C/Gas 4. Line the pastry case with baking paper. Tip in enough baking beans, dry rice or pulses to fill the tart tin. Bake for 30 mins till the pastry is dry when you lift up the baking paper. Whisk the remaining egg yolk with a little water. Lift the paper and beans out of the pastry case. Brush the pastry with the beaten egg. Bake for another 15 mins till pale golden. Take out of the oven and set aside if it’s ready before your filling.
6. While the pastry case bakes. Tip the drained squash into a food processor and blitz to make a purée (no processor? Press it through a sieve into a large bowl). Add 150g sugar to the processor with 1 tsp each of the cinnamon and ginger, ¼ tsp ground cloves and grate in ¼ nutmeg. Add a pinch of salt and blitz together. No processor? Beat everything together with a wooden spoon or electric beaters.
7. Beat the eggs and add to the processor with the double cream and rum, if you’re using it. Pulse one last time to combine (or beat together).
8. Spoon the pie filling into the pastry case. Bake for 30 mins till the pie is just set and the filling shimmers if you gently shake the tin. Cool the pie in the tin, then transfer to serving plate. Just before serving, dust over a little icing sugar and a pinch of ground cinnamon.