Preheat the oven to 200 C/400C.
Put the aubergine, red pepper and onions into a large roasting tray and coat in the olive oil. Season with salt and pepper and roast for 20 minutes (shake the pan once or twice during this).
Add the tomatoes, olives and garlic and cook for a further 10 minutes.
While the vegetables are roasting, boil a pot of salted water and cook your pasta to al dente. Drain, reserving about 1/4 of a cup of the cooking water. Put the pasta back into the pot with the reserved water.
When the tray of vegetables is ready, stir them through the pasta. Add the anchovies and torn basil leaves and server with fresh Parmesan cheese.