Begin by cutting the loaf of bread into thick slices, then cutting the slices into pieces that are roughly 1-2 inches square. You can do this just prior to cooking, or 1-2 days in advance and set the bread cubes aside to dry out a bit. If the bread is very fresh, place the cubes in a 300°F oven for about 10 minutes to toast them lightly.
1 medium-sized loaf bread
Lightly coat a deep 9x13-inch baking dish with cooking spray and spread the cubed bread in the bottom.
In a large skillet, warm the olive oil over medium heat. Sauté the pancetta until the fat is mostly rendered and it begins to crisp, 7-9 minutes. Transfer pancetta to a paper towel-lined plate to drain. Coarsely chop or crumble, if not already in pieces.
1 teaspoon extra-virgin olive oil, 8 ounces cubed pancetta
To the same skillet, still over medium heat, add the onions, 1/4 teaspoon kosher salt, and sugar. Cook, stirring occasionally, about 20 minutes, until the onions are golden brown and caramelized.
2 medium yellow onions, 1 teaspoon kosher salt, 1/2 teaspoon granulated sugar
While the pancetta and onions are cooking, add eggs to a large bowl and whisk to blend. Add the milk, thyme, mustard, nutmeg, remaining 3/4 teaspoon kosher salt, and black pepper. Whisk again until well-combined.
12 large eggs, 3 cups whole milk, 1 and 1/2 teaspoons dried thyme, 1 teaspoon dry mustard, 1/2 teaspoon ground nutmeg, 1/2 teaspoon freshly ground black pepper
Spread the pancetta over the bread cubes, then layer the onions on top. Sprinkle grated Gruyère on next, then pour the egg mixture over everything.
1 and 1/2 cups shredded Gruyère cheese
Press down gently on the top, so that all of the bread cubes get soaked with the egg mixture. Cover tightly and refrigerate overnight.
When ready to bake, preheat the oven to 350°F.
Bake the strata, uncovered, until the edges are bubbling and the top begins to brown, 35-50 minutes. To check for doneness, insert a knife into the middle of the strata; if it comes out clean, the dish is baked through. Cover with aluminum foil near the end of cooking if the top is already browned. Remove and serve warm.