Preheat your oven to 400°F (200°C). Line a baking sheet with parchment paper.
In a large bowl, combine the peeled and cubed sweet potatoes with the olive oil, cinnamon, and nutmeg. Toss gently until everything is evenly coated.
Spread the seasoned sweet potatoes in a single layer on the prepared baking sheet. Roast for 50-60 minutes, or until they are soft, slightly caramelized, and golden brown. Remove from the oven and let them cool a bit.
Reduce the oven temperature to 375°F (190°C). Lightly grease a large 9x13 inch baking dish.
In a clean bowl, combine the cooled roasted sweet potatoes, milk, vanilla extract, brown sugar, pure maple syrup, cinnamon, nutmeg, allspice, soaked raisins (if using), and 1 cup of marshmallows. Mix everything gently. It's perfectly fine if some sweet potatoes mash – you want a delightful blend of mashed and chunky pieces.
Scoop this flavorful mixture into your prepared baking dish, spreading it evenly. Dot the top with the small cubes of butter and gently tuck in the remaining 1 cup of marshmallows into the mixture.
In a separate small bowl, combine the raw pecans with 1/4 cup pure maple syrup. Stir until the pecans are well coated.
Generously sprinkle this maple-pecan topping over the sweet potato casserole mixture, ensuring it's mostly covered.
Cover the baking dish loosely with aluminum foil. Bake in the preheated oven for 15 minutes.
Carefully remove the foil and continue baking for another 15 minutes, or until the topping is golden brown and crunchy, and the marshmallows are beautifully melted and lightly toasted.
Remove from the oven, let it cool for a few minutes before serving warm with your favorite healthy mains.