Deseed the squash and cut into 8 wedges, then place in a roasting tray and sprinkle over the chilli, drizzle with oil and season. Toss well, spread evenly and roast for 35 to 40 minutes. Remove and cool.
Peel and finely chop the onion and garlic, pick the sage leaves and roughly chop the chestnuts. Finely grate the Parmesan.
Add a drizzle of oil to a pan and place over a medium heat. Fry the onions for 10 minutes, until soft, then add the garlic, sage and chestnuts. Continue to fry for 3 to 4 minutes, then add to a large bowl.
Remove the skin from the squash and mash the flesh together with the Parmesan, then season.
Dust a clean surface with flour and roll your pastry into a 30cm x 45cm rectangle, about 5mm thick and cut into two equal pieces.
Beat the egg, then brush the longer side of each piece of pastry with the egg. Place your filling down the centre, then fold the pastry over, using egg to seal the edges (press down with a fork).
Cut each into 8 equal-sized pieces and place on a lined baking tray.
Brush with the egg and bake for 20 to 25 minutes until crisp and golden.