Preheat oven to 350°F. Grease a 13x9 inch baking dish.
Cut ham into ¼ inch pieces. Peel and slice potatoes into ⅛ inch slices (or as thin as you can).
In a medium bowl, combine the mushroom soup, sour cream, salt, and pepper with a whisk.
Place ⅓ of the potatoes in the dish, followed by ⅓ of the onions, ⅓ of the ham, and ⅓ of the mushroom soup mixture. Make two more layers of all four ingredients until the ingredients are used up.
Cover the casserole with foil, and bake for 75 minutes.
Uncover, top with cheese, and bake for another 45 minutes, or until the potatoes are cooked through (your knife should glide easily through the potatoes, instead of being met with resistance).
Let sit for 15 minutes before serving.
Notes
Don't use low fat sour cream here—it'll separate as the casserole cooks. Use full-fat sour cream. Make it ahead: you can assemble the casserole up to 8 hours in advance of baking it. Place it in the refrigerator until you're ready to bake it. You can freeze scalloped potatoes for up to 3 months. I suggest splitting any leftovers into individual portions and then freezing them. You can cook them from frozen in a 350°F oven for 25–30 minutes.