Preheat the oven to 200°C/400°F/gas mark 6. Place the cashews in a heat-proof bowl and cover with boiling water. Set aside.
Place the peppers skin side up in a roasting tray, add the tomatoes cut side up and place the sliced onion and whole garlic cloves in the gaps. Drizzle with the olive oil and roast for around 45 minutes until the peppers are charred and the tomatoes blistered and bubbling.
Cover the tray tightly with tin foil and set aside for 10 minutes to steam. Carefully peel the papery skin off the peppers.
Place the peeled peppers in a blender. Squeeze the flesh from the garlic cloves out of their skins into the blender. Tip in the tomatoes and onion.
Drain the cashews and add to the blender along with the thyme, basil, nutritional yeast, lemon juice, pepper flakes (if using), salt and pepper.
Blend until very smooth. Taste and add more salt as needed. If the sauce is too thick then you can add a splash of water and blend again.
Cook the pasta according to the instructions on the packet then serve with the sauce.
The sauce can be made in advance and stored in an airtight container in the fridge for up to three days.