1. Preheat the oven to 425°F. Line two baking sheets with aluminum foil.
2. In a large bowl, toss the eggplant, zucchini, and squash with 3 tablespoons of the olive oil. Season to taste with salt and pepper. Spread the mixture onto 1 1/2 of the foil-lined baking sheets. Add the grape tomatoes to the large bowl and toss with 1 tablespoon of the olive oil. Season to taste with salt and pepper. Spread out onto the empty half of the 1 baking sheet.
3. Roast until the vegetables are softened and beginning to brown, about 30 minutes. Transfer to a rack and let cool slightly.
4. While the vegetables are roasting, make the tomato sauce: In a large heavy-bottomed pot, heat the remaining 2 tablespoons olive oil over medium-high heat. Add the red onion and red bell pepper and sauté, stirring occasionally, until the onion is translucent and the pepper is softened, 3–4 minutes. Add the garlic and sauté, stirring occasionally, until fragrant, about 1 minute. Add the canned tomatoes, smashing them gently with a spoon, and simmer, uncovered, for 10 minutes.
4. Add the roasted vegetables, stir, and simmer for 5 minutes. Stir in the balsamic vinegar and basil and season to taste with salt and pepper. Serve in bowls with shaved Parmesan (if desired).
Do ahead: This dish tastes even better on the second or third day, so make it a few days in advance and just reheat on the stovetop before serving. Store, in an airtight container in the refrigerator for up to 5 days, or freeze for up to 3 months.