Line a baking dish with parchment and spoon in 1/3 of the polenta mixture. The polenta will be starting to firm up quickly so make sure you work fast. Spread the polenta out thin. Sprinkle on a light cheese layer, followed by ham, and then a little more cheese. Repeat, creating a middle layer with another 1/3 of polenta. Add cheese, ham, and more cheese, and then top with the final polenta layer. Spread smooth. Top with more parchment and press it down to make it tight. Place in the fridge to rest overnight.