1/2 cup loosely packed fresh basil leaves (about 4 sprigs)
Instructions
Arrange two racks to divide the oven into thirds and heat the oven to 425°F. Meanwhile, roll out 1 pie dough into a 12-inch round. Transfer to a regular 9-inch pie plate (not deep dish) and press into the bottom and up the sides. Roll the excess dough over itself and crimp the edges as desired. Freeze while the oven heats, at least 15 minutes.
Arrange 2 pounds sliced medium heirloom tomatoes in a single layer on a parchment-lined rimmed baking sheet. Drizzle with 1 tablespoon olive oil and season with 1/2 teaspoon kosher salt and 1/4 teaspoon of the black pepper.
Line the crust with parchment paper. Fill with dried beans or pie weights. Place the tomatoes on the upper rack and the pie crust on the lower rack. Bake until the edges of crust begin to brown, 15 to 20 minutes.
Remove the crust from the oven (leave the tomatoes in). Remove the parchment and pie weights. Sprinkle 1/2 packed cup of the shredded sharp cheddar cheese evenly over the bottom of the crust. Return to the oven and bake until the cheese is melted and the crust is golden-brown, about 5 minutes more.
Remove the crust and the tomatoes from the oven (the tomatoes should be slightly wrinkly and look dry on top). Let both cool completely, about 30 minutes. Reduce the oven temperature to 350°F.
Stir 1/2 cup mayonnaise, 3/4 ounce grated Parmesan cheese, 1 1/2 teaspoons Dijon mustard, the remaining 1 1/2 packed cups sharp cheddar cheese, and remaining 1/4 teaspoon black pepper together in a medium bowl.
Sprinkle half of 1 thinly sliced small shallot in the pie crust. Using a spatula, carefully transfer half of the tomatoes to the pie crust in an even layer over the shallots. Top with the remaining shallots. Tear 1/2 cup loosely packed fresh basil leaves into bite-sized pieces and scatter on top. Dollop the mayo-cheese mixture on top, then spread into an even layer, going all the way to the edges. Top with the remaining tomato slices in an even layer (some overlapping is okay). Use a spatula to gently compress all of the pie filling.
Bake on the bottom rack until the crust is deep golden-brown, the filling is bubbling, and the cheese is beginning to brown, 40 to 45 minutes. Check after 30 minutes to see if the crust is browning too quickly and tent loosely with aluminum foil if needed. Let cool for at least 20 minutes before slicing.