1. Preheat oven to 400 degrees F. Drizzle whole eggplants with half of the oil, wrap in foil, and place on a baking sheet. Roast until eggplants are thoroughly soft, 1 hour, and remove eggplants. Lower oven temperature to 350 degrees F.
2. When eggplants are cool enough to handle, scoop the flesh into a bowl.
3. While the eggplant roasts, set a wide, heavy-bottomed pan over medium-low heat and heat the oil. Add the onion and carrot to the pan and cook until very soft, 15-20 minutes.
4. Raise heat to medium and add the mushrooms. Cook, stirring frequently, until all of the liquid has evaporated and the mushrooms are thoroughly browned, 30-45 minutes.
5. Stir in beer and garlic and simmer until liquid has evaporated.
6. Stir in the tomato paste and pepper flakes. Cook for 1-2 minutes.
7. Add the eggplant, the tomatoes and their juices, soy sauce and bay leaves. Transfer pan to the 350 degrees F oven and roast, uncovered, for 2-4 hours.
8. Stir in the balsamic vinegar just before serving and serve hot over pasta or polenta.