Preheat the oven to 190°C, fan 170°C, gas 5.
Put the onions, courgettes, peppers, tomatoes, carrots and garlic in a single layer in either a large roasting dish or 2 small roasting dishes. Tuck the bay leaf or rosemary in among them. Drizzle with the oil and red wine vinegar and roast in the oven for 45 minutes.
Meanwhile, cook the pasta according to the packet instructions. Drain, reserving a little of the cooking liquid.
Squeeze the soft garlic flesh out of the skin over the vegetables and then spoon all the vegetables and juices into a blender (or into a big jug if you are using a hand-held blender) and whizz until smooth. Season to taste with a little freshly ground black pepper.
Pour half the sauce into a pan and heat through – you may like to add a little of the pasta cooking water to get the consistency you want. Add the pasta and mix together.
Cook's tip: spoon the remaining sauce into 2 small freezer bags and freeze until needed.