Preheat the oven to 350°F (377°C). Grease a large 9×13 inch casserole or baking dish with non-stick cooking spray and set aside.
Rinse the potatoes under cold running water and gently remove any dirt or debris from the skin using a vegetable brush. Dry thoroughly. Alternatively, carefully peel the potatoes using a vegetable peeler (peeling is optional). Thinly slice each potato into rounds approximately 1/8-1/4″ thick (I recommend using a mandolin for this). See notes.
Melt the butter in a medium saucepan or Dutch oven set over medium heat. Cook the onions until softened, stirring often, about 5 minutes. Stir in the garlic and continue to cook for an additional 1-2 minutes.
Add the all-purpose flour and mix well with the onions. Cook, whisking continuously, for about 1-2 minutes to create a roux.
Reduce the heat to low and slowly add the milk, whisking continuously, then add the chicken broth.
Increase the heat to medium-high and bring to a simmer. Cook, stirring continuously, for a minute or so before removing from the heat. Slowly stir in the heavy cream.
Just before assembly, drain the potatoes (if applicable) and pat dry with paper towels.
Assemble the cheesy scalloped potatoes in three layers. Each layer consists of potatoes followed by cream sauce, followed by shredded cheddar and Parmesan cheese. For example, potatoes, sauce, cheese, potatoes, sauce, cheese, potatoes, sauce, cheese. The top layer will always be cheese.
Tent with foil and bake for 45 minutes. Uncover and bake for an additional 35-45 minutes or until golden and bubbly around the edges.
Allow the potatoes to rest for 10-15 minutes before serving.