To make the dough, in the bowl of a stand mixer fitted with the paddle attachment, or in the bowl of a food processor, mix the flour, sugar, and salt. (The dough can also be made by hand in a bowl using a pastry blender.) Add the pieces of butter and mix on low/medium speed, or pulse, until the butter is in pea-sized pieces. If using a food processor or pastry blender, pulse it in the processor just a few times (or mix with the pastry blender) until the butter is in irregular dried chickpea-sized pieces.
Add the ice water and vinegar and continue to mix (or pulse a couple of times) just until the dough comes together. Turn the dough out onto a very lightly floured countertop and gently pat the dough until it's in a rough rectangle about 1-inch (3cm) thick. Fold the dough over in half, then repeat two more times, patting the dough out until it's 1-inch/3cm thick and folding it over in half, for a total of three times. Wrap the dough in plastic or an eco-friendly alternative, and refrigerate for at least 1 hour. (The dough can be refrigerated for up to three days.)
To roll and bake the crust, remove the dough from the refrigerator and if very firm, let rest a few minutes before rolling. On a lightly floured countertop, roll the dough to a 12-inch (31cm) circle. Brush off excess flour and fit the dough into a 9-inch (23cm) springform pan, easing it into the corners and making sure it evenly goes up the sides. The dough is forgiving so feel free to use your fingers to make sure the dough is even around the sides so there are no lower spots, as you want the custard layer you'll be pouring in later to be even. Chill the dough in the refrigerator or freezer for 30 minutes. (The dough can be refrigerated for 2-3 days, or frozen, if you'd like to do this step in advance.)
To bake the tart crust, preheat the oven to 375ºF (190ºC.) Line the dough inside of the cake pan with a large sheet of foil, easing the foil into the corners of the pan. Be sure to use a sheet of foil that's large enough to cover the dough, as well as all the way up to the top edges of the cake pan which will prevent the edges of the crust from getting too dark. Fill the foil with pie weights or dried beans and bake until the dough is partially cooked, about 30 minutes. Remove the foil and pie weights and let the crust cool while you prepare the filling.
To make the filling, place the bacon on a dinner plate lined with paper towels. Place a paper towel over the bacon and cook in the microwave, turning the bacon over midway during cooking, until it's cooked through and relatively crisp. (The French don't usually crisp bacon, but prefer it on the chewy side.) Thick-cut bacon will take about 6 minutes. (If you use thin bacon, reduce the cooking time.) Uncover and let cool.
While the bacon is cooking, heat the butter in a small skillet and sauté the chopped shallots until soft and translucent, about 4-5 minutes. Set aside to cool.
Crumble or cut the bacon into bite-size pieces and evenly strew the pieces into the baked tart shell, along with the cheese and shallots.
in a medium bowl, whisk together the eggs, cream, milk, salt, black pepper, nutmeg, and cayenne. Pour the custard into the tart shell and bake until the filling is just barely set, 35-40 minutes. The center should still jiggle when you shake the pan gently and the top will be light golden brown. Let cool for 10 to 15 minutes then remove the sides of the cake pan and serve.