Sign up to our newsletter
Preheat the oven to 200°C/Fan 180°C/ Gas Mark 6. Spread out the squash in a large roasting tin with the onions and garlic, drizzle over the oil, season and scatter with thyme. Toss to combine. Roast for 25-30 minutes until tender, tossing halfway through. Set aside to cool completely.
Meanwhile, roll out 500g pastry on a lightly floured surface to a 38cm circle. Lightly grease the base and sides of a 23cm round springform cake tin. Lift the pastry into the tin and gently press into the base and sides to evenly line, leaving a 1cm overhang. Prick the base all over with a fork. Chill for at least 30 minutes, or up to 6 hours ahead.
Put the spinach in a saucepan, cover with boiling water and leave to wilt. Drain and rinse under cold water until cool; squeeze out as much water as possible. Put the spinach, ricotta, hard cheese, pesto and lemon zest in a bowl, season and mix well.
Preheat the oven to 190°C/Fan 170°C/Gas Mark 5. Remove the chilled pastry case from the fridge and scatter half the breadcrumbs over the base. Arrange the roasted squash and onions on top. Top with the spinach mixture. Layer on the roasted peppers and scatter the remaining breadcrumbs
Roll out the remaining pastry on a lightly floured work surface to a 24cm circle. Cover the pie and press the edges together to seal. Trim away any excess, then crimp all the way around. Brush the top of the pie with beaten egg. Make 3 incisions in the centre to allow steam to escape. Place the tin on a baking tray and bake for 1 hour or until the pastry is cooked and golden.
Leave to cool for at least 30 minutes before releasing from the tin. Transfer to a wire rack for 2 hours if serving warm, or leave to cool completely. Once cool, keep in an airtight container in the fridge