Heat the oven to 220°C/fan 200°C/gas mark 7. Put the squash in a large roasting tin, seeds and all. Add the coriander seeds, thyme and 2tablespoons of the oil, then mix well. Spread out evenly and season with salt and pepper. Roast for 25 minutes, turning halfway through.
Meanwhile, put the remaining olive oil, along with the butter, maple syrup and cumin seeds, in a 24cm (9½in) ovenproof frying pan over a medium heat. Heat, swirling until bubbling, for about a minute, then remove from the heat and add the harissa paste. Arrange the roasted squash slices flat on the base of the frying pan, on top of the mixture. Use all the slices, adding a second layer if needed. Allow to cool slightly.
On a lightly floured surface, roll out the pastry until it is about 4mm (¼in) thick and large enough to cover the frying pan. Using the rolling pin to pick the pastry up, carefully drape it over the squash, letting the edges overhang the sides of the pan. Trim off the excess pastry with scissors, leaving about 1cm (½in) all the way round, to allow for ‘shrinking’ as it cooks. Tuck the overhanging pastry down between the squash and the frying pan. Make a few slits in the pastry to allow the steam to escape.
Bake for 30 minutes, until brown. Leave to cool for 10 minutes. Place a lipped serving plate upside down over the pastry, then, using oven gloves, carefully flip the whole thing over. Remove the pan, replacing any escaped slices of squash, if needed. Scatter with the mint and serve.