Place potato slices in a saucepan and cover with water. Bring to a boil. Add a few teaspoons of salt to the water. Simmer potatoes until slightly tender, about 8 to 10 minutes. Drain.
Melt butter in a pan over medium heat. Add shallots and cook 2 to 3 minutes.
Add garlic and red pepper flakes and cook 1 minute.
Add cream and bring to a simmer. Remove from heat and stir 1 cup of cheddar cheese into cream until it melts. Set aside.
Preheat oven to 375 degrees and grease a casserole dish with butter or cooking spray.
In a small bowl, stir together 1 cup shredded cheddar cheese, mayonnaise, and pimentos, reserving a few of the pimentos to put on top of the casserole.
Layer half of the potato slices on bottom of prepared casserole dish. Season with salt and pepper.
Spread all of the cheddar/pimento mixture on top of bottom layer of potatoes.
Layer remaining potatoes on top of pimento cheese. Season with salt and pepper.
Pour cream mixture on top. Cover casserole with aluminum foil and bake for 30 minutes.
Remove foil and sprinkle remaining 1/2 cup cheese on top along with reserved pimentos. Bake for 15 to 20 more minutes