First, make the base of the pesto. Heat 1 tbsp of the olive oil in a frying pan and add the onion, tomato and aubergine. Fry over a medium-low heat for 8-10 mins until the onion is pale gold and the tomatoes and aubergine are soft. Add the peppers and cook for a couple of minutes, then add the garlic and chilli, and cook for another 2 mins. Transfer to a plate and leave to cool.
Heat the oven to 190C/170C fan/gas 5. Trim the broccoli at the base, then halve any large pieces lengthways. Put in a roasting tin, drizzle with the olive oil and season. Add the garlic and turn everything using your hands – make sure the garlic is under the broccoli so it will toast without burning. Cook in the oven for 15-20 mins (check on it during cooking for doneness).
Meanwhile, cook the pasta in boiling salted water until al dente. It usually takes a little less time than it says on the packet.
For the pesto, tip everything on the plate into a food processor along with the almonds and the remaining 2 tbsp extra virgin olive oil. Season and pulse to blend everything together. Stir in the ricotta and taste for seasoning. Tear the basil and stir that in too.
Drain the pasta and toss it with the broccoli (including the garlicky juices from the roasting tin) then use as much of the pesto as it takes to coat the pasta and serve the rest on the side. Grind over some black pepper and serve immediately with the grated cheese.