1 large globe eggplant
2 large zucchini and/or summer squash
24 ounces cherry and/or grape tomatoes
8 garlic cloves, unpeeled
5 tablespoons olive oil, plus more
Kosher salt
8 ounces fresh ricotta (about 1 cup)
¾ teaspoon crushed red pepper flakes
8 ounces salted low-moisture mozzarella, grated, divided
1 cup basil leaves, divided
Step 1: Place racks in upper and lower thirds of oven; preheat to 450°. Cut off stem end of eggplant, then shave a thin slice off of fattest part of bulbous end. Rest eggplant on newly cut side so it doesn’t roll around your board.
Step 2: Cut eggplant crosswise into ½"-thick slices.
Step 3: Arrange eggplant slices in a single layer on a rimmed baking sheet, then fit as many pieces of zucchini as possible on same baking sheet, tucking into spaces around eggplant.
Step 4: Place remaining zucchini slices on one half of another rimmed baking sheet, arranging as close together as possible and in a single layer.
Step 5: On empty side of baking sheet, arrange tomatoes and garlic. Drizzle 1 Tbsp. oil over tomatoes and garlic and toss with your hands to coat.
Step 6: Using your hands, smear 2 Tbsp. oil over exposed sides of eggplant and zucchini slices. Eggplant in particular acts like a sponge and will soak up oil in an instant. Since all you want is a thin, even coating, it’s better to smear them with oil rather than to drizzle.
Step 7: Still using your hands, turn eggplant and squash slices over and smear other side with 2 Tbsp. oil. Season all vegetables on both baking sheets with a couple of 4-finger pinches of salt.
Step 8: Place sheet with eggplant on lower rack and sheet with tomatoes on upper rack and roast until eggplant is deeply browned on the underside and tomatoes are lightly blistered, 15–25 minutes.
Step 9: Remove both baking sheets from oven. You’ll notice that the vegetables will have shrunk quite a bit. On baking sheet with eggplant, slide a flexible metal spatula underneath ALL slices and turn them over. Slide rounds over to one side, then transfer zucchini from sheet with tomatoes onto sheet with eggplant, turning them over in the process. You should end up with tomatoes and garlic on one baking sheet, and eggplant and zucchini on the other.
Step 10: Let baking sheet with tomatoes cool, but return baking sheet with eggplant and zucchini to lower rack and roast until second side of eggplant is deeply browned, 10–15 minutes. Let sit until cool enough to handle.
Step 11: Meanwhile, combine 8 oz. ricotta, ¾ tsp. red pepper flakes, and 6 oz. mozzarella in a medium bowl. Drizzle with oil and mix with a fork to combine; season lightly with salt.
Step 12: Using a fork, remove garlic cloves from baking sheet and transfer to a cutting board. Press on skins to force out the soft, caramelized cloves; discard skins. Mash cloves to a paste with fork, then stir into ricotta mixture.
Step 13: Drizzle some oil into a shallow 2-qt. baking dish. Arrange one-third of zucchini and eggplant slices in a single layer.
Step 14: Scatter one-third of blistered tomatoes over, then dollop half of ricotta mixture over tomatoes.
Step 15: Tear one-third of basil leaves and scatter over ricotta.
Step 16: Repeat layering process with half of remaining eggplant and zucchini, all of remaining ricotta mixture, and half of remaining tomatoes and basil. Top with remaining eggplant, zucchini, and tomatoes.
Step 17: Sprinkle remaining 2 oz. mozzarella over and bake until mozzarella is melted and browned in spots and liquid around the edges is bubbling, 15–20 minutes.
Step 18: Let rest 10 minutes, then top with remaining basil and drizzle with a little more oil.