Hearty with an Italian flair. Serve with grilled meats. You can make this 4 hours ahead and refrigerate. Then, bring to room temperature for 30 minutes before baking.
Arrange tomato slices in 1 layer on a rack set in a shallow baking pan and sprinkle on both sides with 1 teaspoon salt and 1/2 teaspoon pepper. Let drain 30 minutes.
While tomatoes drain, bring corn, milk, cream, and 1/4 teaspoon salt to a simmer in a 2- to 3-quart heavy saucepan over high heat, then reduce heat and simmer, partially covered, until corn is tender, about 5 minutes. Cool slightly, uncovered.
Put oven rack in upper third of oven and preheat oven to 375°F. Butter a shallow 2-quart baking dish.
Toss together bread crumbs, basil, cheese, and remaining 3/4 teaspoon salt and 1/2 teaspoon pepper in another bowl.
Arrange one third of tomato slices in baking dish, then cover evenly with one third of bread-crumb mixture and dot with one third of butter. Spoon half of corn mixture over crumbs, then repeat layering with half of remaining tomatoes, crumbs, and butter, and all of corn. Arrange remaining tomatoes over corn, then top with remaining bread crumbs and dot with remaining butter.
Bake, uncovered, until top is golden and gratin is bubbling all over, 40 to 45 minutes. Cool slightly on a rack, about 15 minutes, before serving.