Preheat the oven to 200°c/180°c fan/gas mark 6.
Put the diced squash on a baking tray, drizzle with 2 tablespoons of the olive oil, season generously with salt and pepper, then toss to coat all the cubes. Bake for 10 minutes.
Transfer the squash to a large bowl and add the chickpeas, cumin seeds and harissa. Stir everything together, spread out on the tray and return to the oven to cook for a further 15 minutes, or until the squash is just tender. Leave to cool.
Turn the oven down to 180°c/160°c/gas mark 4. Heat the remaining olive oil in a pan and cook the onions, leek and garlic for 10-15 minutes over a low heat until softened.
Put half the onion mixture in a bowl with the chestnuts, breadcrumbs, coriander, sultanas and stock. Mix and season. Stir the remaining onion mixture into the squash and chickpeas.
To assemble the baklava, trim the filo sheets so they fit neatly into a deep 25cm x 35cm baking dish or roasting tin. Brush the dish with melted butter. Brush 4 of the filo sheets with melted butter, then layer them up in the bottom of the dish. Add a third of the squash mix, a third of the chestnut mix and a third of the crumbled feta. Top with another 4 sheets of buttered filo and add another third of each mixture. Top with another 4 sheets of filo, then the remaining mixture, then finish with a final layer of 4 sheets.
Cut a classic baklava pattern into the pastry all the way through to the bottom layer. Sprinkle with the onion seeds, then bake for 30-40 minutes, or until the baklava is deep golden and crisp. Cool for 10 minutes in the dish.
Drizzle the baklava with honey and sprinkle with chilli flakes and salt before serving in wedges. A dollop of Turkish chilli sauce makes a great accompaniment.