Wash the eggplants and cut into cubes. Put the cubes in a sieve, season them with a lot of salt and let them steep for about 10 to 15 minutes (this is how the bitter substances are extracted from the eggplant). Rinse off the salt well. Now spread the aubergine cubes on a baking sheet greased with plenty of olive oil and bake in the oven for about 20 minutes at 200 ° C until they are soft.
Meanwhile, peel and cut the onions into eighths. Heat olive oil in a large pan and fry the onions well. After a few minutes, add the garlic cloves, then the sugar. Caramelize the sugar with the onions. Caution: the sugar must not burn!
Now add the diced tomatoes with the balsamic vinegar and a dash of water to the pan and reduce to a sauce. If canned tomatoes are used, omit the water and add the tomato juice from the can.
As soon as the aubergines are soft, take them out of the oven and add them to the sauce. Now reduce the sauce to the desired consistency and, if necessary, bind with a little tomato paste. Season to taste with salt and cayenne pepper.
Meanwhile, cook the pasta in plenty of salted water until al dente and serve with the sauce. The sauce can also be garnished with a little basil if you like.