Preheat oven to 350°F. Spread bread cubes on a baking sheet and toast for 10 minutes, until lightly crisp. Transfer to a large bowl.
In a large skillet, melt butter over medium heat. Add onions, 1/2 teaspoon salt, and 1/4 teaspoon pepper. Cook, stirring occasionally, until deeply caramelized, about 20 minutes. Add to the bowl with bread.
In a medium bowl, whisk together eggs, milk, cream, mustard, thyme, nutmeg, remaining 1/2 teaspoon salt, and remaining 1/4 teaspoon pepper.
Pour the egg mixture over the bread and onions. Add 1 cup of Gruyère and stir gently to combine. Let sit for 15 minutes to allow bread to absorb liquid.
Transfer mixture to a greased 9x13-inch baking dish. Sprinkle remaining 1/2 cup Gruyère on top.
Bake for 35-40 minutes, until golden brown and set in the center. Let cool for 5 minutes before serving.
Tips
Use day-old bread for best texture; fresh bread may become too mushy.
Caramelize onions slowly for maximum sweetness.
Can be assembled up to 24 hours ahead and refrigerated; add 10 minutes to baking time.
Leftovers can be reheated in a 350°F oven for 10 minutes.