Remove and discard the outer leaves of the cabbage and cut the cabbage into quarters. Bring plenty of salted water to a boil in a large pot; add the cabbage and cook just until tender, 10 to 12 minutes. Drain well. When cool enough to handle, put the cabbage in a cotton kitchen towel and wring out all the excess moisture. Cut out and discard the pieces of core. Slice the cabbage crosswise into very fine strips and measure out 2 cups, tightly packed (save the remainder to add to a soup or sauté).
Cut the leeks in half lengthwise and then crosswise into 1/4-inch slices. Put the sliced leeks in a colander and rinse thoroughly under warm water. Drain well and set aside.
In a large, heavy skillet, melt the butter over medium heat, add the bacon, and sauté until browned. Remove with a slotted spoon to a side dish and reserve. Discard all but 2 Tbs. of the fat in the skillet; add the leeks and 2 Tbs. water, and simmer over low heat until tender, 5 to 7 minutes. Add the shredded cabbage and reserved bacon, season with salt and pepper (this is a good time to taste for seasoning), and sauté over medium heat for 5 minutes, stirring often. Set aside until completely cooled.
Heat the oven to 350°F. If using a tart pan with a removable bottom, put it on a baking sheet. In a large bowl, combine the eggs and cream and whisk until well blended. Stir in the cabbage mixture and Gruyère. Pour into the prepared tart shell, spread evenly and sprinkle with the Parmigiano. Bake until the custard has set and the top is lightly browned, 35 to 40 minutes. Let cool for 15 to 20 minutes before serving.