Slice tomatoes into 1/4-inch rounds and place them on paper towels. Sprinkle with salt and let them sit for 20-30 minutes to release excess moisture. Pat dry with additional paper towels.
In a large skillet over medium-low heat, melt butter and add sliced onions with brown sugar. Cook slowly for 15-20 minutes, stirring occasionally until onions are golden and jammy.
Preheat oven to 375°F (190°C). Press the pie crust into a 9-inch pie plate, crimping the edges decoratively. Brush with beaten egg white and blind bake for 10 minutes until just beginning to set.
In a medium bowl, combine the shredded cheese, mayonnaise, basil, thyme, Dijon mustard, and minced garlic. Mix thoroughly until well incorporated.
Begin layering your pie: start with a third of the cheese mixture spread over the bottom of the par-baked crust. Follow with half the tomatoes, half the caramelized onions, and half the bacon crumbles. Repeat layers, finishing with the remaining cheese mixture on top.
Bake for 35-40 minutes until the top is golden brown and bubbling. If the crust edges brown too quickly, cover them with foil.
Allow the pie to rest for at least 15 minutes before slicing – this resting period allows the flavors to meld and ensures clean slices.