Preheat the oven to 350 degrees . Pierce the eggplants all over, place on a baking sheet and cook until very soft, about 1 hour. Let cool slightly, then cut each eggplant in half and scoop the flesh into a bowl; discard the skin.
Meanwhile, in a pot of boiling, salted water, cook the linguine until al dente. Drain, reserving 1/2 cup of the pasta cooking water.
In a large skillet, heat the olive oil over medium heat. Add the garlic and cook, stirring, for 2 minutes. Add the tomatoes and their juice and cook until the liquid has reduced, about 10 minutes. Stir in the eggplant; heat through. Season with salt and pepper.
Add the pasta and basil; toss to coat. Add the reserved pasta cooking water as needed.