Preheat oven to 400 degrees. Spread bread cubes in a single layer on a baking sheet; bake 20 minutes, till slightly dried.
While bread is baking, heat a large skillet over medium heat. Add ham and saute a few minutes. Add oil (if desired) and stir in onion, garlic, and mushrooms. Saute till onion and garlic are golden and soft and mushrooms have released their liquid. Remove from heat and set aside.
Whisk together milk, egg, thyme, pepper, and salt.
To assemble the strata, layer half the bread cubes in the bottom of a lightly greased 9 by 13 inch glass baking dish. Sprinkle with half the ham mixture and 1/3 of the swiss cheese. Repeat layers. Gently pour egg mixture over layers and top with remaining 1/3 swiss cheese. Cover tightly with aluminum foil and refrigerate* at least 4 hours, preferably overnight.
To bake the strata, preheat oven to 350 degrees. Bake strata, still covered with foil, for 30 minutes. Remove foil and continue baking for 20-30 minutes, until cheese on top is melted and egg portion is set (check by inserting a knife in the center--if it comes back without egg on it, you're set!).
Let strata rest 5 minutes before serving.
*Refrigeration time not included in recipe prep/cooking time.