Preheat oven to 375°F. Place a large baking sheet in the oven to heat.
If you made the pastry, on a floured work surface roll it to an 11-inch round. Fit the pastry into a 9-inch pie plate and form a high, fluted edge. Prick all over with a fork. (Refrigerate if it’s gott en warm.) Put a sheet of foil inside the pastry and fill the foil with dried beans or rice.
Place the pie plate on the heated baking sheet. Bake until the pastry is set with a touch of golden at the edges, about 20 minutes. Remove the foil with the beans or rice, return the pastry to the oven and bake until it’s brown in spots, about 10 more minutes. If it starts to slip down or puff up, press it back in place with a spoon. Cool on a wire rack.
Meanwhile, halve and core the tomatoes and cut them crosswise into ¼-inch-thick half-moon slices, discarding the ends. (You should have a heaping 3 cups.) Place tomato slices on a double layer of paper towels and sprinkle with salt. Let stand for about 15 minutes, then blot slices with paper towel.
Toss ½ cup of the cheddar with the cracker or panko crumbs in a small bowl. Sprinkle half evenly over the bott om of the cooled crust. Arrange half of the tomatoes in an overlapping circle on top of the crumbs, fi lling the center with more slices. Sprinkle with half of the red onion and ¼ cup cheddar. Arrange the remaining tomatoes in the same manner on top; sprinkle with the remaining red onion.
Mix the mayonnaise, basil, remaining ½ cup cheddar, and pepper in another small bowl. Spread over the tomatoes with a rubber spatula, covering them completely. Sprinkle with the remaining crumb-cheese mixture.
Place the pie directly on the oven rack. Bake until the top is browned and the filling has started to bubble at the edges, 45–50 minutes. Transfer to a wire rack and let stand for at least 30 minutes for easiest cutt ing. Serve warm or at room temperature, cut into wedges.