Wash the peppers and place them in a lightly oiled ovenproof dish. Bake in a preheated oven (electric oven: 200 °C/ gas: level 3) for twelve minutes. Remove from the oven and fill into a freezer bag.
Close firmly and put aside. In the meantime peel and roughly dice the onions. Peel garlic and chop finely. Clean, wash and dice the aubergines, place them in a bowl and sprinkle with salt.
Pour the tomatoes into a sieve and drain. Collect liquid. Chop the tomatoes coarsely. Chop olives coarsely. Wash basil, dab dry and chop coarsely. Chop anchovy fillets finely. Drain capers.
Peel the skin from the peppers, remove the seeds and cut into fine strips. Heat olive oil in a large frying pan, fry onions until translucent, add garlic and fry briefly. Add aubergines and pieces of tomato and braise for ten minutes while turning.
Add peppers, capers, anchovies, olives, basil, and pepper, stir, add tomato liquid, cover and let simmer for 18 to 20 minutes, stirring several times. Then season again with salt and pepper.
Meanwhile, cut the spaghetti into thirds. Pour into plenty of boiling salted water and cook for nine minutes. Drain the pasta, quench briefly, mix with the vegetable sauce and sprinkle with cheese. Serve in deep plates garnished with basil as desired.