Adapted from SmittenKitchen.com
2 cups all-purpose flour
1 tablespoon baking powder
1 3/4 teaspoons salt, divided
6 tablespoons cold unsalted butter, cut into 1/2-inch cubes, plus 2 teaspoons melted
3/4 cup milk
1/3 cup mayonnaise (or substitute sour cream)
1 3/4 pounds tomatoes
1 1/2 cups corn (from about 3 ears), coarsely chopped
2 tablespoons finely chopped basil
1 tablespoon finely chopped thyme
1/4 teaspoon black pepper
7 ounces coarsely grated sharp cheddar (1 3/4 cups)
Whisk together flour, baking powder, and 3/4 tsp salt in a bowl, then blend in cold butter (6 tbsp) with a pastry blender until it resembles coarse meal. Add milk, stirring until mixture just forms a dough, then gather into a ball.
Divide dough in half and roll out one piece into a 12" round. Transfer dough to a pie plate and set aside. Preheat oven to 400 F with rack in middle. Whisk together mayonnaise and lemon juice.
Cut an X in bottom of each tomato and blanch in a large pot of boiling water for 10 seconds. Immediately transfer with a slotted spoon to an ice bath to cool. Peel tomatoes, then slice crosswise 1/4" thick and gently remove seeds and extra juices. As you work, set slices on a paper towel to absorb additional moisture.
Arrange half of tomatoes in crust, overlapping, and sprinkle with half of corn, 1 tbsp basil, 1/2 tbsp thyme, 1/2 tsp salt, 1/8 tsp pepper, and 1 cup grated cheese. Repeat layering with remaining tomatoes, corn, basil, thyme, salt, and pepper. Drizzle lemon mayonnaise over filling and sprinkle with remaining cheese.
Roll out remaining piece of dough into a 12-inch round and fit over filling, folding overhang under edge of bottom crust and pinch edge to seal. Cut 4 steam vents in top crust and brush with melted butter (2 tsp). Bake until crust is golden and filling is bubbling, about 30 to 35 minutes, then cool on a rack. Serve warm or at room temperature.
Pie can be baked 1 day ahead and chilled. Reheat in a 350 F oven until warm, about 30 minutes.