Preheat oven to 350ºF (180ºC). Butter or lightly coat with cooking oil spray a 9"x13" (23cm x 33cm) casserole dish; set aside.
In a large bowl, mix together both soups using a large spoon.
Gradually mix in 1 can of milk.
Add seasoned salt and black pepper; mix well and set aside.
Peel and slice four potatoes thinly using a food processor or mandoline. Immediately add to soup mixture and mix well.
Change blade, on the food processor, to grater/shredder (or use box grater); shred remaining two potatoes. Immediately add to soup mixture and mix well.
Add chopped ham and onion (if using) and mix well.
Pour mixture into prepared dish and smooth down.
Evenly distribute both cheeses over the top and set aside.
In a medium bowl, mix together crushed cornflakes and melted butter to coat.
Sprinkle the cornflakes evenly over the top of the cheese layer.
Bake at 350ºF (180ºC) for 1 1/2 hours, turning dish once after 45 minutes.
Remove from the oven and let rest for 5 minutes before serving.
Cover and refrigerate