Fill a deep skillet three-quarters with water; bring to a simmer over medium. Add the vinegar; season with salt. Crack the eggs, 1 at a time, into a small bowl and gently slide them into the water. Cook the eggs until the whites are set but the yolks are still runny, 3 to 4 minutes. Using a slotted spoon, transfer to a plate. Reduce the heat to low to keep the water warm.
In a bowl, toss the eggplant with 1/2 tsp. salt. Spread in a single layer on paper towels. In the same bowl, toss the zucchini with 1/2 tsp. salt. Spread in a single layer on more paper towels. Let stand 20 to 30 minutes to remove excess liquid. Pat dry.
In a large skillet or Dutch oven, heat 1 tbsp. oil over medium-high. Add the tomatoes in a single layer. Cook until soft and blistered, shaking the pan often, 4 to 7 minutes. Add the garlic; cook, shaking the pan often, until aromatic, 30 to 60 seconds. Transfer the mixture to a large bowl.
Wipe out the skillet, add 2 tbsp. oil and heat over medium-high. Add the eggplant and cook, turning occasionally, until tender and golden brown, 5 to 7 minutes. Add to the bowl with the tomato mixture.
Add the remaining 2 tbsp. oil to the skillet; heat over medium-high. Add the zucchini; cook, turning often, until crisp-tender and golden brown, 3 to 5 minutes. Add to the tomatoes and eggplant. Mix the oregano into the ratatouille. Season with pepper.
Bring 4 cups water to a boil in a medium saucepan. Add 1/2 tsp. salt. Gradually whisk in the polenta. Cook, whisking constantly, until the mixture begins to boil. Reduce the heat to low and continue cooking, whisking often, until thick and tender, adding more water if too thick, 15 to 25 minutes.
Slip the eggs back into the skillet of water just to rewarm. Divide the polenta among 4 bowls; top with the ratatouille and eggs. Sprinkle with the cheese and torn basil leaves.