Cut the onion, beetroot and tomatoes in half and put them in a baking tin. Cut the carrot into chunks and tuck between the vegetables together with the garlic cloves. Drizzle with balsamic vinegar and oil, then season with salt and pepper. Scatter the chilli flakes on top, if used, then toss well.
Bake in in pre-heated oven (set to 180°C) for approx. 30 minutes, turning the veggies a couple of times.
When the baked vegetables are tender, transfer them to a saucepan, together with the jus. Remove the skin of the garlic cloves. Add the vegetable stock and bring to a simmer. Add the basil leaves. Using a stick blender, whiz the mixture into a coarse sauce. Add more stock if it's too thick. Reheat it if necessary. (Or refrigerate it for later use)
Cook the pasta according to the packet’s instructions. Add the green vegetables to the cooking water for the last 2-3 minutes of cooking. Drain, then keep warm under a lid.
Combine the sauce with the pasta & greens, then serve immediately.