Salt the eggplant: Place the diced eggplant in a colander and toss with 1 teaspoon of salt.
Let it sit for 20–30 minutes to release bitterness and moisture. Rinse and pat dry thoroughly.
Brown in batches: Heat 2 tablespoons olive oil in a large skillet over medium-high heat. Add eggplant and cook until golden and softened at the edges, about 6–8 minutes.
Transfer to a bowl.
Soften the aromatics: Add another tablespoon of olive oil to the pan. Cook the onion and bell pepper with a pinch of salt until they start to soften, 4–5 minutes. Stir in the garlic and cook 30 seconds until fragrant.
Add the squash: Stir in zucchini and yellow squash.
Cook, stirring occasionally, until they take on a little color and begin to soften, 5–7 minutes. Avoid over-stirring so they can brown slightly.
Build the sauce: Clear a small space in the pan and add the tomato paste. Toast it for 1 minute.
Add cherry tomatoes (or crushed tomatoes), thyme, oregano, and red pepper flakes. Stir to coat the vegetables.
Combine and simmer: Return the eggplant to the pan. Reduce heat to medium-low.
Add 1–2 tablespoons water if the pan looks dry. Simmer uncovered for 8–10 minutes, stirring occasionally, until the vegetables are tender but not mushy.
Finish with brightness: Stir in balsamic vinegar, if using. Taste and adjust salt and pepper.
Drizzle the remaining olive oil over the top for extra richness.
Add Parmesan: Sprinkle the grated Parmesan over the ratatouille and gently fold it in until it melts and coats the vegetables. Reserve a little for serving.
Garnish and serve: Remove from heat. Top with fresh basil or parsley and a final dusting of Parmesan.
Serve warm as a main or side.