One simple option is to shred the cheese. The heat moves from the surface of the pancake into the cheese - so a thick slice has to melt all at once, and from the bottom up, and it may not melt in time. Grated or shredded cheese has a lot more surface area, and warms quicker, and traps heat in the air between the shreds, and so will melt much quicker than sliced or chunked cheese - even if the layer ends up being fairly thick. Also it will help if you sprinkle it all over the pancake instead of just a row in the middle - again more surface area, the better it melts.
Another option is to warm the cheese just a bit - even if it's just room temperature it will melt quicker than fridge temperature, which might make the difference depending on just how thick the layer you want is. Of course, there's nothing that says your bowl of shredded cheese can't be put somewhere a bit warmer, like next to the stove, so that it melts really quick when you sprinkle it on the pancake.
Another option, if you know you're only making sour pancakes, is to put some of the cheese into the batter to begin with - not all of it, or it will change the texture and cooking time by a lot, but some of the cheese can be added in without changing too much, and that means the amount added on top can be less, and so will melt quicker.
You might, depending on how runny your pancake batter is, even make filled pancakes - use just a little batter, half a pancake's worth or less, and quickly spread it thin, sprinkle on some of the cheese with your other hand, and immediately top with the second half a pancake's batter (spreading or dabbing it around as best you can), and flip immediately as you've probably been cooking the first side just a tad too long. Sprinkle more cheese if you want, or add the ham then. It will work best when the batter is a particular texture, runny enough to spread but thick enough to stay in place... the point is that if you're quick and careful it can be done it is just relentlessly fast and a lot of work.
Or you can make something more like quesadillas - pour the batter, add the cheese and ham, fold in half, and flip back and forth until the center is cooked (the outside won't overcook as much if you can keep flipping it, same basic principle as an omelet).
And, of course, you can make a processed cheese, or a cheese sauce - carefully shred or grate your cheese, add to a white sauce (fry flour and butter, add milk very gradually, add cheese gradually), and add as much cheese as you wish to make it as thick as you please. The cheese sauce can be poured when warm, or spread when cool, and if you folded in enough cheese it might even be slice-able when cold (this is how processed cheese slices work, cheese thinned just a bit with milk and butter) and again, it will melt much more easily than regular cheese.
And finally, you can warm the finished product. If you're making just one, turn off the stove as soon as you flip the pancake - the second side will cook in the residual heat, but it will take longer... more time for your cheese to melt without overcooking the second side. If you're making a few pancakes, you can fold them over and set them aside as you're cooking, and once you're done set them back on the (now turned off) stove once they're all made, and let the residual heat warm them up again... it shouldn't overcook too much since the heat is lower and tapering off, but it should warm them enough to help melt any last cheese (already warmed by the pancake). And if you're making lots, turn on the oven (or have a pan on very low heat on the other side of the stove), to put the mostly-finished pancakes in, so they can finish warming and melting while you're cooking a whole batch, and you can serve them all at once.