Heat olive oil in a large skillet over medium heat; cook and stir garlic until fragrant, 1 to 2 minutes. Add eggplant; cook, stirring constantly, until eggplant is softened, about 5 minutes. Add tomatoes with juice and cook until sauce is reduced, about 20 minutes.
Bring a large pot of salted water to a boil. Add the pasta and cook to al dente according to package directions.