Adjust the oven rack to the middle position and preheat the oven to 350°F (175°C). Spray the inside bottom and sides of a 12 × 4.5 × 3.125-inch (30.5 × 11.4 × 7.94 cm) rectangular metal baking pan with baking spray containing flour. Line the bottom of the pan with a 12-inch rectangular piece of parchment paper.
In a medium bowl, whisk together the flour, baking powder, baking soda, cinnamon, and salt.
In a large bowl, whisk together the sugar, oil, brown sugar, eggs, and vanilla until fully combined, about 1 minute.
Add the flour mixture to the sugar mixture and use a rubber spatula to stir until just combined and no dry flour remains. Fold in the grated carrots and chopped pecans until well incorporated.
Scrape the batter into the parchment-lined baking pan and smooth the top, ensuring the batter is evenly spread into the corners.
Place the baking pan in the oven and bake until the cake is golden brown and a toothpick inserted in the center comes out clean, about 1 hour.
Using oven mitts, remove the baking pan from the oven and place it on a cooling rack. Let the cake cool completely in the pan for about 1½ hours.
Remove the cake from the pan and carefully peel away the parchment paper.