Arrange a rack in the middle of the oven and heat to 350°F. - Meanwhile, place the potatoes in a large pot, cover with water, and bring to a boil over medium-high heat. Reduce the heat to a simmer and cook until the potatoes are tender and a knife pierces easily to the center.
Drain the potatoes, then return them to the pot. Add the sour cream or yogurt and milk. Using a potato masher, smash until your desired texture is reached, adding more milk as needed. Add the cheddar, shallots, salt, and pepper and stir to combine. Taste and season with more salt and pepper as needed.
Transfer the potato mixture to a medium gratin or baking dish (about 2 1/2 quarts) and spread into an even layer. Bake until warmed through, about 30 minutes.
Remove the baking dish from the oven. Turn the oven onto broil. Sprinkle the casserole with the Parmesan cheese. Broil until golden brown, 2 to 3 minutes.