Heat your oven to 200°C/Fan 180°C/Gas 6. Halve the gem squash and scoop out the seeds with a spoon. Chop the squash into 2cm chunks (you can eat the skin, so no need to peel). Tumble the squash onto a baking tray. Drizzle over 1 tbsp olive oil and some salt and pepper. Slide into the oven and roast for 30 mins till golden and softened. Toss halfway through.
While the squash is roasting, finely slice the sundried tomatoes. Pop them in a jug. Crumble in the stock cube. Pour in 500ml boiling water and leave the tomatoes to soften.
Peel and finely chop the onion. Peel and crush 1 garlic clove. Chop half the heirloom tomatoes into small chunks. Heat a large pan for 2 mins. Drizzle in ½ tbsp olive oil. Add the onion, season with salt and pepper and cook for 5 mins till softened. Add the garlic and chopped tomatoes. Cook for 3 mins till the tomatoes have broken down a little.
Tip the risotto rice into the pan and stir together to coat the grains in the tomatoey oil. Pour in the sundried tomatoes along with their water. Stir well.Turn the heat to low and pop on a lid. Very gently
cook for 20 mins, till the water has been absorbed and the rice is tender. Stir every now and then, adding a little more water if necessary.
While the risotto is cooking, make the walnut pesto. Set a dry frying pan on the heat. Throw in the walnut halves and toast them for 2-3 mins till slightly darkened and nutty smelling. Tip onto a chopping board and cool for a few mins then finely chop them.
Pull the leaves from the thyme stalks. Peel and grate the remaining garlic. Zest the lemon and squeeze the juice. Add everything to a bowl with ½ tbsp oil and mix well with some seasoning. You can throw everything into a food processor, if you have one, and pulse for a smoother pesto.
Halve or quarter the remaining heirloom tomatoes, depending on their size. Roughly chop the spinach leaves.
Remove the roast squash from the oven. Taste the risotto. The grains should be soft with a slight bite. Season, if you think it needs it. Tip in most of the roast squash and all of the chopped spinach. Stir together gently. Pop on the lid for 1 min to allow the spinach to wilt.
Spoon the risotto into warm bowls. Top with the remaining roast squash, the heirloom tomatoes and a large spoonful of the walnut pesto. Cut the lemon half into wedges and squeeze over to taste.