In a large bowl, combine the sliced sweet potatoes with salt, pepper, and nutmeg. Toss well.
In a saucepan, melt the butter over medium heat. Add the chopped onion and sauté for about 5 minutes. Stir in the minced garlic and cook for an additional minute.
Slowly pour in the heavy cream or milk while whisking continuously. Bring to a gentle simmer and reduce heat. Stir in the shredded cheddar cheese until melted.
In a greased 9x13-inch baking dish, layer half of the sweet potatoes. Pour half of the creamy sauce over the first layer. Repeat with the remaining sweet potatoes and sauce.
In a small bowl, mix the breadcrumbs with the grated Parmesan cheese. Evenly sprinkle the mixture over the top.
Cover the dish with aluminum foil and bake for 30 minutes. Remove the foil and bake for an additional 15-20 minutes.
Allow the dish to cool for 10 minutes before serving.