Preheat your oven to 350°F (175°C) and line a 12-cup muffin pan with paper liners.
In a medium bowl, whisk together the flour, baking powder, baking soda, cinnamon, nutmeg, and salt.
In a large bowl, beat the vegetable oil, granulated sugar, and brown sugar together until smooth. Add the eggs, one at a time, beating well after each addition.
Stir in the shredded carrots, vanilla extract, chopped pecans, and raisins (if using).
Gradually add the dry ingredients to the wet ingredients, mixing until just combined.
Divide the batter evenly among the prepared muffin cups.
Bake for 22-25 minutes or until a toothpick inserted into the center of a cupcake comes out clean.
Let the cupcakes cool in the pan for 5 minutes before transferring to a wire rack to cool completely.
Once cooled, drizzle caramel sauce over the cupcakes and sprinkle with additional chopped pecans.
Notes
For best results, ensure all ingredients are at room temperature before beginning.