1. Heat the oven to 180°C/gas 4. Cut the squash in half lengthways, scoop out and discard the seeds, then cut the flesh into ½-1cm half-moons.
2. Add the squash to a medium bowl, along with the carrot, beetroot and onion. Pour over the oil, then add the chopped rosemary, garlic, ½ tsp of salt and plenty of pepper, then toss to coat.
3. Heat a 24cm non-stick, oven-proof frying pan on a medium-high heat. Add the sugar, cook for 4-5 minutes, until it melts and becomes a semi-dark caramel, then take off the heat. Leave the caramel to cool a little (it will keep cooking, so don’t leave it too long) then lay the rosemary sprig in the centre and a few sage leaves around it. Arrange the vegetable slices around the rosemary in a circular pattern, working from the outside in and overlapping as much as possible. Add the walnuts, then spoon over any rosemary and garlic left in the bowl.
4. Roll the pastry into a rough 26cm circle and lay it on top of the pan, making sure it covers all the contents by tucking it in around the sides. Prick all over with a fork and bake for 45-50 minutes, until the pastry is golden brown, and the caramel is bubbling up at the edges. Put a large plate upside-down on top of the pan and invert so the tart comes out on the plate.