Preheat oven to 350F.
Wash and peel the potato and sweet potato.
Bring to boil salted water, place the corn and cook for 4 minutes. Drain the water.
In a pot filled halfway with water, place the potato and sweet potato, cover, and simmer for 20 minutes over medium heat.
Take the potato and mash with a potato masher, add the milk, salt, flour, mozzarella cheese, and butter, and mix it.
Chop the sweet potato, and divide some for the filling, and some for garnish.
In a frying pan over medium heat, drizzle the olive oil, add garlic, and onion. Stir until caramelized.
Incorporate the thyme, sweet potato, carrot, and corn, stir and cook for 5 minutes.
Place at the bottom of an iron skillet, use a spoon to spread the potato mix over, and sprinkle the parmesan cheese.
Take it to the oven and bake for 20 minutes or until the cheese starts to turn golden
Remove from the oven, garnish with the remaining sweet potato and rosemary.
Serve and enjoy.