Cook the macaroni in plenty of salted water until al dente, rinse and drain well.
Finely dice the pepperoni and garlic. Cut the onions into fine rings and sauté them in the heated oil until they are soft. Cut the ham into short strips. Peel and slice tomatoes. Beat the eggs, season well with pepper, salt and half of the oregano and mix well with the pasta. Now put the macaroni and egg mixture in a greased baking dish and cut into small pieces for better distribution. Mix the peppers, garlic and the remaining oregano with the tomatoes and spread evenly over the pasta. Spread the onions and boiled ham on top. Finally, cover with the tomato slices, pepper, salt and sprinkle with the cheese. Baked in the oven preheated to 200 ° C on the lower rack for approx. 25 minutes. If necessary, briefly switch on the grill again to brown.
Sprinkle with freshly chopped basil before serving.