Cut bread in half horizontally. Rub garlic over cut sides of bread; sprinkle with pepper. Place on a baking sheet, cut sides up. Broil 5 1/2 inches from heat (with electric oven door partially opened) 3 minutes.
Coat a nonstick skillet with cooking spray; add margarine. Place over medium-high heat until margarine melts. Add mushrooms; saute 8 minutes. Arrange mushrooms over bread; top with ham. Sprinkle with thyme; top with cheese. Broil 5 1/2 inches from heat 2 minutes or until cheese melts. Cut each bread half into 2 pieces.