Clean, wash and dice the aubergine, courgette and peppers. Peel garlic and onion and dice finely. Heat the oil in a pan. Fry the vegetables, garlic and onion.
Add tomatoes and stock, bring to the boil and cook for about 5 minutes. Chop the tomatoes slightly with a spatula if necessary. Cook pasta in boiling salted water according to package instructions. Season vegetable-tomato sauce with salt, pepper and oregano.
Pour the pasta onto a sieve and drain. Arrange spaghetti with the sauce on plates. Sprinkle pamesan on top. Serve garnished with oregano.