1. Adjust oven rack to upper-middle position and heat oven to 400 degrees. Brush 13- by 9-inch baking dish with 1 tablespoon oil; set aside.
2. Toss zucchini and summer squash slices with 1 teaspoon salt in large bowl; transfer to colander set over bowl. Let stand until zucchini and squash release at least 3 tablespoons of liquid, about 45 minutes. Arrange slices on triple layer paper towels; cover with another triple layer paper towels. Firmly press each slice to remove as much liquid as possible.
3. Place tomato slices in single layer on double layer paper towels and sprinkle evenly with 1/2 teaspoon salt; let stand 30 minutes. Place second double layer paper towels on top of tomatoes and press firmly to dry tomatoes.
4. Meanwhile, heat 1 tablespoon oil in 12-inch nonstick skillet over medium heat until shimmering. Add onions, remaining 1/2 teaspoon salt, and 1/4 teaspoon pepper; cook, stirring occasionally, until onions are softened and dark golden brown, 20 to 25 minutes. Set onions aside.
5. Combine garlic, 3 tablespoons oil, remaining 1/2 teaspoon pepper, and thyme in small bowl. In large bowl, toss zucchini and summer squash in half of oil mixture, then arrange in greased baking dish. Arrange caramelized onions in even layer over squash. Slightly overlap tomato slices in single layer on top of onions. Spoon remaining garlic-oil mixture evenly over tomatoes. Bake until vegetables are tender and tomatoes are starting to brown on edges, 40 to 45 minutes.
6. Meanwhile, process bread in food processor until finely ground, about 10 seconds. (You should have about 1 cup crumbs.) Combine bread crumbs, remaining tablespoon oil, Parmesan, and shallots in medium bowl. Remove baking dish from oven and increase heat to 450 degrees. Sprinkle bread-crumb mixture evenly on top of tomatoes. Bake gratin until bubbling and cheese is lightly browned, 5 to 10 minutes. Sprinkle with basil and let sit at room temperature 10 minutes before serving.