Place potatoes in a stockpot; cover with water (to 2 inches above potatoes); bring to a boil. Cook 40 minutes or until tender. Drain. Cool; peel and cut into 1/4-inch-thick slices.
Heat a large nonstick skillet coated with cooking spray over medium-high heat. Add mushrooms; sauté 5 minutes. Add onion and garlic, sauté 3 minutes. Add broth; cook until evaporated. Stir in spinach, 1/2 teaspoon salt, and 1/4 teaspoon black pepper.
Preheat oven to 350°.
Place half the potatoes in a single layer on the bottom of an 11 x 7-inch baking dish. Spoon mushroom mixture over potatoes; sprinkle with ham. Layer remaining potatoes over top.
Combine 1/2 teaspoon salt, 1/4 teaspoon black pepper, milk, flour, and eggs. Pour over potatoes (dish will be full). Bake at 350° for 30 minutes. Sprinkle with cheeses; bake an additional 20 minutes.