1 whole large baguette (3/4 lb)
1 Tablespoon unsalted butter (1/2 stick), melted
2 whole onions, chopped
2 Tablespoons olive oil
1 pound cooked ham, cut in 1/2" cubes
4 whole large eggs
4 cups whole milk
1 teaspoon salt
1/4 teaspoon freshly grated nutmeg
6 cups spinach leaves (1 bunch), coarsely chopped
3/4 pounds fontina, grated
Freshly ground black pepper to taste
Preheat broiler. Diagonally cut baguette crosswise into 3/4-inch thick slices and brush both sides with butter. Toast on a baking sheet under broiler 3 inches from heat until golden, about 30 seconds on each side.
Preheat oven to 350 degrees.
Cook onions in oil in a 12-inch nonstick skillet over moderately high heat, stirring occasionally, until golden. Add ham and cook, stirring occasionally, until ham is lightly browned.
Whisk eggs in a large bowl and whisk in milk, salt, nutmeg, and pepper. Add toasted bread and toss gently. When the bread is saturated, transfer it to a shallow 3-quart casserole, slightly overlapping slices. Add any remaining egg mixture.
Tuck spinach and ham between slices, reserving a little ham to sprinkle over top. Sprinkle cheese over pudding, lifting slices with a spatula to allow some to fall between them. Sprinkle reserved ham over pudding and bake in middle of oven until puffed and edges of bread are golden and custard is set in middle, about 45 minutes to 1 hour.