Choose a new cookbook worth up to £28 when you subscribe to our magazine.
An hour before making the pastry, wrap the butter and chill in the freezer until firm. Heat the oven to 200C/180C fan/gas 6. Tip the flour into a large bowl with the salt, stir, then unwrap the end of the chilled butter and coarsely grate into the seasoned flour. Stir everything together using a cutlery knife, then swiftly add 8-10 tbsp ice-cold water, a little at a time, stirring until it starts to clump together. Form into a disc with your hands, adding a little more water if the pastry feels dry. Wrap and chill for 1 hr. At this stage, the pastry will keep frozen for two months.
Toss the squash with 1 tbsp oil, most of the thyme leaves and seasoning. Arrange on a baking sheet and roast for 15 mins. Heat the rest of the oil and the butter in a frying pan over a medium heat and cook the shallots with a pinch of salt for 15 mins until caramelised. Add the sugar and vinegar, and cook for 3 mins more. Season, then leave to cool slightly.
Steam the chard leaves in a steamer basket for 3 mins. Tip into a tea towel and squeeze out the excess water. Roughly chop, then mix with two-thirds of the hard cheese and the mascarpone. Season.
Put a baking sheet in the oven to heat up. Roll the pastry out between two sheets of baking parchment to a 40 x 30cm rectangle. Transfer to a baking tray on its parchment, then peel off the top layer. Spoon over the shallots, leaving a 3cm border. Top with the chard mixture, the rest of the cheese and the squash. Fold the pastry border slightly over the edge of the filling, then brush with the egg wash. Chill for 1 hr. Slide the tray onto the hot baking sheet and bake for 35-40 mins. Scatter over the remaining thyme and the hazelnuts. Serve with a chicory salad.