Preeat oven to 375˚F (190˚C). Peel the garlic clove, crush it a bit, and then rub it all over the inside of a 2-quart shallow baking dish. Then oil the dish, so the vegetables won't stick.
Slice all the vegetables quite thinly. Don’t bother peeling the eggplant or the summer squash, but I like to remove the peel from the potatoes. Put all the vegetables in a large bowl. Strip the leaves from several branches of fresh thyme; add the leaves to the vegetables. Gently toss the veggies and thyme with 2-3 tablespoons of oil.
If using the onion: Heat a skillet, then add a bit of olive oil and sauté the onions until tender and lightly browned, 6 to 8 minutes. Scatter the onions evenly over the bottom of the oiled baking dish.
Arrange the vegetable slices in a shingled spiral in the baking dish in this order: eggplant, tomato, yellow squash, potato. Repeat until all the vegetables have been used – if you have leftover sliced towards the end, just stick them in wherever it seems good to you. Sprinkle the vegetables lightly with a bit of salt, then lay any leftover sprigs of thyme on top.
Cover the dish tightly with foil. Place in the oven and bake about 1 hour, until all the vegetables are tender. After an hour, remove the foil and return to the oven for another 30 minutes. The vegetables should be quite tender, liquid will have been cooked off, and you should see light browning on some edges.
When the vegetables are cooked and just starting to brown at the edges, sprinkle with a bit of grated Parmesan cheese, and bake 15 minutes longer, until the top just begins to brown.
Serve hot, just warm, or at room temperature: this is not a fussy dish at all.
You can assemble this casserole and refrigerate it for a day before baking. You can also bake it a day or even two days ahead of time – just reheat it in a medium oven, or serve at room temperature.