Heat the olive oil in a large skillet over medium-high heat. Add the onion and cook, stirring occasionally, until golden, about 8 minutes. Add the mushrooms and cook, undisturbed, until they begin to brown, about 2 minutes. Add 1/2 teaspoon salt, and pepper to taste; continue cooking, stirring occasionally, until soft, about 4 more minutes. Stir in the spinach and cook until wilted, about 2 minutes. Remove from the heat and let cool.
Brush a 9-by-13-inch baking dish with olive oil. Arrange the bread in the dish in a single layer with the edges slightly overlapping, then spoon the mushroom-spinach mixture on top. If making ahead, cover and refrigerate overnight.
When ready to bake, preheat the oven to 350 degrees F. Crack an egg onto each piece of bread; season with salt and pepper. Pour the milk evenly over the top and sprinkle with the cheese. Bake until the egg whites are set, 25 to 30 minutes.