Savory Leek and Bacon Bread Pudding

1/2 French baguette, cut into cubes
1/2 tablespoon olive oil
3/4 cup diced leek
1/2 cup milk
2 eggs
1/4 teaspoon salt
1/4 teaspoon ground black pepper
1 pinch ground nutmeg
olive oil cooking spray
1 cup shredded Gruyere cheese
4 slices bacon, cooked and diced

Preheat the oven to 350 degrees F (175 degrees C).
Place baguette cubes onto a baking sheet.
Bake in the preheated oven until dry, about 15 minutes.
Remove bread and set aside.
Meanwhile, warm oil in a skillet over medium heat.
Add leeks and cook until softened but not brown, 2 to 3 minutes, remove from heat.
Whisk milk and eggs together in a bowl.
Season with salt, pepper, and nutmeg.
Grease a casserole dish with cooking spray.
Sprinkle a thin layer of Gruyere cheese on the bottom of the casserole dish.
Top with 1/2 the toasted bread cubes.
Spread leeks over bread cubes and sprinkle diced bacon on top.
Top with more cheese, reserving about half.
Ladle 1/2 the milk mixture over bread, leeks, bacon, and cheese.
Slightly press bread cubes down into the milk.
Layer remaining bread across the top, and continue layering leeks and bacon.
Ladle remaining milk on top. Sprinkle the rest of the cheese over the casserole.
Again, slightly press bread cubes down into the milk.
Let casserole sit for 15 minutes.
Cover casserole very loosely with aluminum foil so cheese does not melt against it.
Place casserole dish on a baking sheet.
Bake in the preheated oven for 20 minutes.
Remove aluminum foil and bake until cheese and bread cubes are well browned on top, 10 to 15 minutes more.