Gently lower eggs into a medium pot of boiling water. Turn off the heat and cover. Let eggs stand for about 6 minutes. Drain and run under cold water to cool and peel; set aside.
In a large high-sided skillet, heat 3 tablespoons of olive oil over medium-high heat. Add the eggplant and ½ teaspoon salt. Cook, stirring occasionally, until eggplant is golden, about 5 minutes. Transfer to a plate; set aside.
Add 2 tablespoons olive oil, onion, garlic, and chili flakes to the skillet. Cook until softened, about 2 minutes. Stir in the bell peppers and cook until slightly softened, about 2 minutes. Add the zucchini and cook until tender, about 7 minutes.
Return eggplant to the skillet. Stir in the tomatoes and ½ teaspoon salt. Bring to a simmer and then reduce the heat. Cook, stirring occasionally, until the vegetables are tender, about 15 minutes. Stir in the vinegar and season with salt and pepper.
Slice soft-boiled eggs in half and nestle into the ratatouille. Top with basil and serve.