Preheat the oven to 400°F (200°C).
Line a large baking sheet with parchment paper. Add the peeled and halved onion, halved carrots and garlic cloves to the baking sheet. Drizzle with the olive oil and use a brush or your hands to make sure everything is coated.
In a small bowl mix the paprika, dried oregano, salt, pepper and chili flakes together.
Sprinkle the seasonings over the cut side of the sweet potatoes and put them cut side down onto the baking sheet. Prick the skin side of the sweet potatoes with a fork a few times.
Roast everything for 45-55 minutes or until everything is fork tender, especially the sweet potatoes. Start checking around the 40 minute mark as it will depend on the size of the sweet potatoes you use.
Once everything is done roasting, set aside until cool enough to handle.
If making the pecan topping: In a small frying pan, melt the butter over medium heat. Once melted and bubbling, stir in the pecans to coat with butter and then stir in cinnamon, brown sugar, chili powder, salt and chili flakes. Cook 2-3 minutes and remove from the heat and set aside on a plate to cool.
Into a blender add the scooped out flesh of the sweet potatoes, the roasted onion and carrots. Squeeze the garlic out of the peels into the blender too. Add in 2 cups of chicken or vegetable broth and blend until smooth. Add in 2 more cups of chicken broth and blend again until smooth. Once fully blended, add the soup to a large pot and warm over medium-low heat until hot enough to serve. Alternatively, blend everything together in a pot using an immersion blender and then warm over medium-low heat.
Stir in the ¾ cup freshly grated cheddar cheese until combined. Taste and adjust seasoning with more salt and pepper if desired.
Add up to 1 cup more broth if you like a less thick soup.
Serve the soup in bowls topped with the pecan topping (if using), more shredded cheddar cheese and fresh minced rosemary.