Cook the penne pasta according to package instructions. Drain and set aside.
Meanwhile, dice the eggplant, tomatoes, onion, and mince the garlic.
In a large skillet, heat the olive oil over medium heat. Add the garlic and onion and cook until softened, about 2 minutes.
Add the diced eggplant to the skillet and cook until tender, about 10 minutes.
Stir in the dried oregano, chili flakes, salt, and pepper. Cook for an additional 2 minutes.
Add the diced tomatoes to the skillet and cook for another 5 minutes, until the tomatoes are softened.
Add the cooked penne pasta to the skillet and toss to combine with the eggplant and tomato mixture.
Garnish with fresh basil leaves and serve with grated Parmesan cheese.