The zucchini, squash, eggplant and tomatoes overflowing from Mediterranean gardens each summer often end up in hodgepodge casseroles that focus on freshness rather than hard-and-fast rules.

And so it is with Greek briam, where thinly sliced tomatoes, zucchini and any number of other vegetables—including squash, red onion, eggplant and bell peppers—are soaked in olive oil, then layered with rounds of potato and baked for up to an hour. Feta cheese typically is served on the side to be crumbled into the dish, providing a briny counterpoint to the sweetness of the vegetables and richness of the oil.

But as delicious as briam is, it poses a challenge. Different vegetables cook at different rates, so when you toss them all into the oven, you run the risk of ending up with overcooked peppers and underdone potatoes. Moreover, that hodgepodge approach can produce a muddle of flavors. We suspected there was a better way.

We started by narrowing the ingredients to potatoes, zucchini, tomatoes and red onion. Then we treated each differently to ensure they cook at the same rate. The zucchini, for example, was cut into 1⁄2-inch rounds, while the potatoes were sliced 1⁄4 inch thick. We also jumpstarted the potatoes in the microwave so they could keep pace with the other, more tender produce.

And instead of layering the vegetables, we simply tossed them together with olive oil and oregano and spread the mixture in a pan. Topped with a few sliced tomatoes, the vegetables baked uncovered in a 475 ̊F oven until tender. We then switched on the broiler for 5 minutes to brown the top, producing pleasantly charred edges on the tomatoes and potatoes for contrasting texture.

With the cooking approach sorted, we turned our attention to the feta. We knew that using precrumbled feta would be a no-go. While convenient, crumbled feta loses moisture, which leaves it tasting overwhelmingly salty. And because crumbled feta has more surface area exposed to air, the fat may oxidize and produce off flavors. So at Milk Street, we favor blocks of feta sold in brine. We cut off slices as needed, rinse them under cold water to remove excess brine, pat them dry and break them apart.

The feta, which we crumbled over the pan after cooking, warmed through as the casserole rested. Chopped basil added color and freshness to a summery, savory casserole that amounted to much more than the sum of its parts.