Preheat the oven to 350 degrees F.
Bring a small saucepan of salted water to a boil over medium heat and add the corn kernels. Cook for about 3 minutes. Strain and set aside.
In a medium saucepan, heat the butter over medium-low heat until melted. Add the flour and stir until smooth. Over medium heat, cook until the mixture turns a light, golden color, about 6 to 7 minutes.
Meanwhile, heat the milk in a separate pan. Add the hot milk to the butter mixture 1 cup at a time, whisking continuously until very smooth. Bring to a boil. Cook 10 minutes, stirring constantly, then remove from heat.
Add the mozzarella cheese and season with salt, pepper and nutmeg and set aside until ready to use.
Place the corn into an oven proof dish or individual ramekins. Pour cheese sauce over corn and sprinkle parmesan cheese on top. Wrap with foil and bake in oven for 25 to 30 minutes. Remove foil and cook for 10 minutes uncovered. Top with bacon pieces and allow to sit for 5 minutes.