Preheat the oven to 350°F. Heat the butter in a skillet over medium heat. Add the onions and cook, stirring, until golden, 8-9 minutes. Add the garlic and cook 1 additional minute. Transfer to a plate and cool for 10 minutes. In a bowl whisk together the eggs, cream, salt, pepper, and pesto. Stir in the 1/2 cup each gruyere and cheddar cheeses. Arrange the tomatoes in the bottom of the pie shell and pour the filling over the top, tapping and shaking the shell so the liquid settles. Arrange the quiche on a baking sheet, sprinkle the top with the remaining 2 tablespoons each gruyere and cheddar and bake until the center is just set and the top is golden, 40-45 minutes. Cool, slice into 8 pieces and dab with additional pesto.