PREHEAT oven to 350°.
In a small saucepan over medium heat, MELT butter; STIR in flour, salt and pepper until smooth.
Gradually WHISK in milk; BRING to a boil, STIRRING constantly; COOK, STIRRING, until thickened, about 2 minutes.
REMOVE from heat; STIR in cheese until melted.
COAT an 8-insquare baking dish with cooking spray; PLACE half of the potatoes in dish; LAYER with 1/2 cup onion, half of the cheese sauce, and half of ham (Optional-see Note 1); REPEAT layers.
BAKE, COVERED, 50 minutes; UNCOVER; BAKE until bubbly and potatoes are tender, 10-15 minutes longer.
1. Cubed ham is optional, if available.
Per Serving (excluding unknown items): 356 Calories; 23g Fat (57.0% calories from fat); 13g Protein; 26g Carbohydrate; trace Dietary Fiber; 28mg Cholesterol; 958mg Sodium. Exchanges: 0 Grain(Starch); 1 Lean Meat; 1/2 Vegetable; 0 Non-Fat Milk; 4 Fat; 1 Other Carbohydrates.