Heat your oven to 200°C/Fan 180°C/Gas 6. Roughly chop the tomatoes and place in a baking dish. Drizzle over 2 tsp olive oil and season. Drop in 1 unpeeled garlic clove. Bake for 30 mins till the tomatoes are very soft and collapsing.
Coarsely grate the courgette. Put it in a sieve with a pinch of salt. Squeeze the courgette a few times to squeeze out some water, then leave in the sieve to drain while you prepare the rest of the polpette ingredients.
Drain and rinse the lentils. Shake dry. Tip into a large bowl and mash with a fork or masher. Peel and grate the remaining garlic clove into the bowl. Shred the mint leaves and add those, too. Halve the chilli, flick out the seeds and finely chop it. Add half to the bowl. Add 1 tbsp of the ricotta. Grate in the lemon zest.
Squeeze the courgette again to get out any last liquid. Add to the bowl along with the breadcrumbs and some salt and pepper. Mix together to make a stiff mixture. Shape into 10 ping-pong sized balls.
Line a baking tray with baking paper. Spread the polpette out on the tray. Bake on a shelf below the tomatoes for 10 mins, then turn them over and bake for another 10 mins.
Bring a large pan of water to the boil. When the polpette and tomatoes have 10 mins left to cook, add the spaghetti to the pan. Simmer for 8 mins till it’s cooked but not too soft. Drain.
Take the tomatoes out of the oven. Remove the garlic and squeeze it out of its skin. Return to the dish. Chop in the butter. Mash the tomatoes, garlic and butter together. Taste and season if needed. Toss the spaghetti with the sauce. Pile onto plates and top with the polpette and 1 tbsp ricotta each. Garnish with parsley leaves and serve with wedges of the zested lemon.