5 pounds medium sweet potatoes halved
1/3 cup rosemary leaves chopped
1/3 cup sage leaves (about 30) roughly chopped, and divided in half
6 tablespoons unsalted butter
1 1/2 cups Panko or coarse breadcrumbs
1/2 cup pecans chopped
to taste Kosher salt and fresh ground pepper,
2 tablespoons unsalted butter
1 1/2 cups shallots (4 small or 2 large) chopped
1 cup heavy cream
1/4 teaspoon nutmeg grated
1 cup (3oz) finely grated Parmesan
2 large eggs, blended
Preheat oven to 350°F. Prick potato skins with a fork and place cut side down on two foil-lined rimmed baking sheets. Roast potatoes, rotating sheets halfway through, until very tender when squeezed, 70-90 minutes. Let cool on sheets. If serving the casserole immediately, increase oven to 400°.
While potatoes roast, in a small saucepan over medium heat, cook half of rosemary and half of sage in 6 tablespoons of butter, stirring occasionally, until butter foams, then browns and herbs are golden and crisp, about 4 minutes; let cool. Add Panko (or breadcrumbs), pecans, 1 teaspoon of Kosher salt and a few cracks of pepper, stir and transfer to a small bowl.
Scoop out flesh from potatoes and transfer to a large bowl (discard skins). Add the remaining half of the fresh rosemary and fresh sage to the potatoes.
Heat 2 tablespoons of butter in the same saucepan over medium. Add shallots and ½ teaspoon Kosher salt, cook, stirring often until translucent and golden around the edges, about 5 minutes. Add cream and nutmeg and bring to a simmer. Remove from heat and let cool 10 minutes, then carefully blend with an immersion blender (or place in a blender and puree). Transfer mixture to the potatoes and add parmesan cheese. Blend with immersion blender, taste and adjust seasoning and then blend in eggs until light and smooth.
Transfer potato mixture to a shallow 2-quart baking dish, smoothing top. Using a spatula, create some peaks and valleys. Top with breadcrumb mixture. Bake casserole until top is golden and crisp, 25-30 minutes. Let cool 10 minutes before serving.