Preheat the oven to 400 degrees F. Lightly coat a 9- by 13-inch baking dish with cooking spray.
Peel the sweet potatoes. Using a sharp knife or a mandoline, cut the potatoes into thin (⅛-inch thick) slices.
Arrange the sweet potatoes slices in rows, overlapping one potato slice with the next one. Arrange in a single layer.
Heat the olive in a small saucepan set over medium heat. Add the shallots. Cook, stirring occasionally, until the shallots are soft, 4 to 5 minutes.
Push the shallots to one side of the saucepan. Add the butter. Once the butter is melted, add the flour and garlic. Cook, stirring constantly, for 1 minute.
Gradually add the broth, whisking the whole time until the broth and flour are combined. Continuing to whisk, slowly pour in the milk. Add the salt, pepper, nutmeg and cayenne pepper.
Lower the heat to medium-low. Whisking frequently, heat the milk but do not allow it to bubble. Boiling the milk may lead to the sauce separating when the potatoes bake.
Once the milk is warm, immediately remove it from the heat. Let it sit for about 5 minutes. Stir in ½ cup of the grated smoked cheese until the cheese is melted Pour the mixture evenly over the rows of sweet potato slices.
Top the sweet potatoes with the remaining 1 cup of grated smoked Cheddar.
Bake until the sweet potatoes are tender when pierced with a fork and the cheese is melted. The potatoes should not be mushy.
Let rest for 10 minutes. Garnish with parsley, if desired. If there is some liquid in the bottom of the pan, use a slotted spoon to serve.