Preheat the oven to 375˚F. Grease a 9 x 13-inch oven-safe casserole dish.
Peel the potatoes and place in a large stockpot filled with water. Bring to a boil and reduce the heat to a simmer. Simmer until the potatoes are cooked through and can be easily pierced with a knife, about 10 -15 minutes.
Meanwhile, melt 1 tablespoon of the butter in medium skillet over medium-high heat. Add the chopped shallot and sauté until translucent, about 5 – 8 minutes. Remove from the heat and set aside.
Once the potatoes are cooked, drain, and return them to the pot. Using a potato masher, mash the potatoes until smooth. Add the cooked shallots, remaining 4 tablespoons butter, milk, salt, pepper, and 1 ½ cups of the cheese. Place over low heat and stir until the ingredients are well combined. Turn off the heat and stir in the beaten eggs. Transfer the mixture to the prepared casserole dish and use a spatula to smooth the top. Bake in the oven for 25 minutes. Sprinkle the remaining ½ cup of cheese over top and return to the oven, uncovered, for another 5 minutes, or until melted. Serve immediately.
This dish can be prepared up to a day in advance. Prepare the dish to the point where it goes into the oven and instead of baking it, simply cover it with plastic wrap and keep in the fridge until ready to bake.
Baking the potatoes uncovered gives the dish a golden crust on the top. If you prefer something softer and more like mashed potatoes, simply cover the potatoes with foil when baking for the 25 minutes and then uncovered for the final five minutes when the cheese melts on top.