Wrap each potato in aluminum foil and place on a baking sheet. Use a small knife to poke holes in the potatoes to allow steam to escape.
Bake in the preheated oven for about 1 hour and 15 minutes, or until the potatoes are very tender and easily pierced with a knife.
Let the potatoes cool to room temperature. Unwrap, place on a plate, cover with plastic wrap, and refrigerate until completely chilled, for 8 hours to overnight.
Preheat the oven to 425°F (220°C) and butter a casserole dish to prevent sticking.
Leave the skin on the potatoes and use a cheese grater to shred them into a large bowl. Add shallots, salt, white pepper, and cayenne to the potatoes. Toss with two forks until well combined.
Add Cheddar cheese and mix well. Gently toss in sour cream until barely combined to keep the mixture fluffy.
Transfer the mixture to the prepared baking dish, piling it up high, then patting it down very lightly for even cooking.
Bake in the preheated oven for 30 to 35 minutes, until piping hot and the top is beautifully browned.
For a crispy top, broil the dish for a few minutes at the end of baking.
Notes
For a crispy top, broil the dish for a few minutes at the end of baking.