Preheat the oven to 180°C/350°F/gas 4. Lightly grease a 25cm non-stick loose-bottomed tart tin with vegetable oil.
Halve the pumpkin, scoop out and discard the seeds, then roughly chop into large wedges (there’s no need to peel it). Spread out on a baking tray, cover with tin foil, then pop in the oven for around 1 hour, or until tender, removing the foil for the final 10 minutes.
Meanwhile, make the pastry. Sieve the flour and xanthan gum from a height into a large bowl, then stir in the sugar and cinnamon. Chop the butter into cubes, then use your fingertips to rub it into the flour mixture until it resembles fine breadcrumbs. Beat the egg in a separate bowl, then add it to the mixture. Use your hands to bring it together into a rough dough, adding a good splash of milk (if needed), but don’t overwork it too much at this stage. Pat the dough into a flat round, roughly 2.5cm thick, wrap in clingfilm and place in the fridge to rest for at least 30 minutes.
Once tender, remove the pumpkin from the oven and leave to cool. Roll out the pastry to roughly the thickness of a pound coin (if you find it crumbles too much, roll it out between two large pieces of clingfilm). Carefully place the dough into the prepared tart tin, gently pressing it into the sides. Trim away any overhanging pastry, prick the base with a fork, then place in the fridge to chill for another 10 minutes.
Place a layer of clingfilm into the chilled tart case, fill with uncooked beans or rice, then pop in the oven to blind bake for 10 to 12 minutes. Remove the clingfilm and beans or rice, then cook for a further 5 minutes, or until golden. Remove from the oven and allow to cool completely.
Meanwhile, scoop the cooled pumpkin flesh into a food processor, discarding the skin, then blitz until smooth. Melt the butter in a small pan over a low heat for 1 to 2 minutes, or until dark and frothy. Add the brown butter to the blitzed pumpkin with the sugar, flour, nutmeg, ½ teaspoon of cinnamon and the vanilla extract. Whisk 2 eggs in a separate bowl, add to the processor, then blitz again until well combined. Transfer the mixture to the cooled pastry case, using a fork or spoon to spread it out evenly.
Roll out the leftover pastry to roughly the thickness of a pound coin, then cut it into long strips, roughly 1cm wide. Place on top of the pie, crisscrossing them as you go to create a nice lattice, then trim away any rough edges. Beat the remaining egg and brush over the pastry. Place the pie in the hot oven for 45 to 50 minutes, or until golden. Dust with icing sugar and cinnamon, then serve.