The key is to make sure the vegetables are very, very dry. To do this, take the sliced & salted squash, zucchini and tomato and place on paper towels and press them dry.
Next, layer the squash then tomatoes into the gratin dish. Cover with caramelized onions, garlic, olive oil, fresh thyme and pepper. Bake for 40 mins.
To make the topping, add diced shallots and parmesan to bread crumbs. Cover the vegetables with the topping and bake until browned.