Grease a 9-by-13-inch (3-quart) casserole dish with oil.
Toss the bread cubes with 2 tablespoons of the oil, 1/4 teaspoon salt and a few grinds of pepper in a large bowl. Heat a large skillet over medium heat. Add the bread to the skillet, and cook, tossing occasionally, until toasted and golden brown, about 8 minutes. Return the toasted bread to the bowl to cool.
Wipe out the skillet. Heat the remaining 2 tablespoons oil over medium-high heat until it starts to shimmer. Add the mushrooms in one layer (resist the urge to stir right away), and cook until they start to brown, about 3 minutes; stir, then continue to brown for 2 minutes more. Add the garlic, thyme, 1/4 teaspoon salt and some pepper, stir continuously for 1 minute, then fold in the spinach and another 1/4 teaspoon salt. Continue to cook, stirring often, until the spinach is wilted, 1 to 2 minutes. Remove from the heat.
Place half the bread cubes in the prepared casserole dish, and sprinkle them with half each of the Gruyere and Parmesan. Add the mushroom-spinach mixture in an even layer. Top with the remaining bread cubes, Gruyere and Parmesan.
In a large bowl, whisk together the eggs, half-and-half, 1/2 teaspoon salt and several grinds of pepper. Pour the egg mixture into the casserole dish. Cover with plastic wrap, and refrigerate for at least 6 hours up to overnight. Remove the casserole from the refrigerator 30 minutes before baking.
Preheat the oven to 350 degrees F. Bake the casserole until the custard is set and the top is golden brown, 50 to 55 minutes. Cool for at least 15 minutes before serving warm or at room temperature.
Copyright 2014 Television Food Network, G.P. All rights reserved.