Slice the tomatoes into 1/4-inch-thick slices and place them on a rack to drain. Sprinkle the tomatoes on both sides with ¾ teaspoon salt, 1 ½ teaspoons total. Let them drain on the rack for at least an hour to remove the unwanted water.
When the tomatoes have finished draining, preheat the oven to 375 degrees. In a heavy skillet over medium-high heat, melt the butter. When the foaming has subsided, add the onions and sauté them for a couple of minutes, until they are slightly soft, and then add the minced garlic. Continue to sauté the onions and garlic until they are translucent, 10 to 12 minutes.
In the bowl of a food processor fitted with a metal blade, combine the mayonnaise, basil leaves, parsley, shallot and green onion, and process them until the mixture is green and smooth, approximately 1 minute.
In a large mixing bowl, combine the mayonnaise mixture with the Gruyere, Cheddar and ½ cup of the Parmesan cheese and stir to mix thoroughly.
Spread the cheese mixture evenly over the cooled pastry crust.
Place the sautéed onion and garlic evenly on top of the cheese mixture, and then arrange the drained tomatoes in a pretty pattern on top.
Sprinkle with the remaining 1 tablespoon Parmesan cheese and the black pepper, and bake the pie for 50 to 60 minutes.
Let the heirloom tomato pie rest for at least 30 minutes before cutting, and serve it warm, at room temperature, or cold with additional basil mayonnaise, some of which you will have left over if you made your own!