1. Preheat the oven to 200 ̊C, gas mark 6; toss the squash (halve any larger chunks) with the shallots, garlic and 1 tbsp butter. Season, spread out on a roasting tray and bake for 20 minutes, tossing halfway through, until the squash is just tender.
2. Meanwhile, grease a 23cm deep loose-bottomed cake tin with butter. Layer the filo pastry in the tin, brushing each sheet with butter and allowing the excess pastry to hang over the edges; set aside. In another bowl, lightly beat the crème fraîche, eggs, and lemon zest and juice together. Stir the chopped sage leaves and chilli into the mixture; set aside the remaining sage and chilli.
3. Pour the crème fraîche and squash mixtures into the pastry case. Twist the excess pastry over to create a frilly edge and brush with a little more melted butter; bake for 20 minutes. Scatter with the reserved sage and chilli, then cook for 5 minutes, until golden. Cool for 10 minutes and serve, with a green salad, if liked.