2 cups all-purpose flour
1 tbsp baking powder
1 3/4 tsp salt, divided
3/4 stick (6 tablespoons or 3 ounces) cold unsalted butter, cut into 1/2-inch cubes, plus 2 teaspoons melted
3/4 cup whole milk
1/3 cup mayonnaise
2 tbsp fresh lemon juice
1 3/4 pounds beefsteak tomatoes
1 1/2 cups corn (from about 3 ears), coarsely chopped by hand (my preference), divided
1/4 cup finely chopped basil, divided
3 tbsp finely chopped chives, divided
1/4 teaspoon black pepper, divided
7 ounces coarsely grated sharp Cheddar (1 3/4 cups), divided
Whisk together flour, baking powder, and 3/4 tsp salt in a bowl, then blend in cold butter (3/4 stick) with your fingertips or 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 on a well-floured counter into a 12-inch round (1/8 inch thick). Fold the round gently in quarters, lift it into a 9-inch pie plate and gently unfold and center it. Pat the dough in with your fingers trim any overhang.
Preheat oven to 400°F with rack in middle. If your kitchen is excessively warm, go ahead and put the second half of the dough in the fridge until you’re ready to use it. Whisk together mayonnaise and lemon juice.
Cut an X in bottom of each tomato and blanch in a large pot of boiling water 10 seconds. Immediately transfer with a slotted spoon to an ice bath to cool. Peel tomatoes, then slice crosswise 1/4 inch thick and, if desired, gently remove seeds and extra juices. Arrange half of tomatoes in crust, overlapping, and sprinkle with half of corn, half the basil, half the chives, 1/2 teaspoon salt, 1/8 teaspoon pepper and one cup of grated cheese. Repeat layering with remaining tomatoes, corn, basil, chives, salt, and pepper. Pour lemon mayonnaise over filling and sprinkle with remaining cheese.
Roll out remaining piece of dough into a 12-inch round in same manner, then fit over filling, folding overhang under edge of bottom crust and pinching edge to seal. Cut 4 steam vents in top crust and brush crust with melted butter (2 teaspoons). Bake pie until crust is golden and filling is bubbling, 30 to 35 minutes, then cool on a rack. Serve warm or at room temperature.
Do ahead: Pie can be baked 1 day ahead and chilled. Reheat in a 350°F oven until warm, about 30 minutes.