Preheat oven to 350 degrees F. Grease a 9×13 inch baking dish with non-stick spray.
Slice potatoes into 1/8 inch slices (very thin). Lay 1/2 of the sliced potatoes into the bottom of the baking dish. Sprinkle 1/2 of the corn and 1/2 of the ham pieces over the potatoes.
In a medium saucepan, over medium heat, melt the butter. Stir in the flour and whisk to combine. Pour in the milk, salt and pepper. Continue to stir constantly until the mixture thickens and bubbles. Remove from heat. Stir in 1 cup of the cheese.
Pour half of the cheese sauce over the potatoes, corn and ham. Repeat another layer of potatoes, ham and corn. Pour remaining cheese sauce over the top.
Cover pan with aluminum foil and bake for 40 minutes. Remove foil and sprinkle remaining cheese over the top. Bake another 20 minutes or until bubbly and hot.
Let stand 10 minutes before serving. Sprinkle each serving with fresh chopped parsley, if desired.