Bring water to boil in a large stock pot. Salt and cook pasta according to package instructions before draining.
Heat oil in a pan over medium heat. Add onion and cook until softened and slightly browned. Add eggplant, basil, and garlic. Cook until soft. Cover with tomato and stir to combine. Simmer for 10 minutes. Add pasta and mozzarella, stirring to combine. Top with Parmesan cheese before serving.