Preheat your oven to 350°F. Line a 9 x 5-inch loaf pan with parchment paper, spray with baking spray and set aside.
In a medium mixing bowl, whisk together the flour baking soda, baking powder, cinnamon, nutmeg, and salt, and set aside.
In a separate large mixing bowl using a handheld electric mixer, or in the bowl of a stand mixer fitted with the paddle attachment, beat together the oil and sugars until combined and smooth. Beat in the eggs into the sugar and oil one at a time until completely mixed in. Add the vanilla and mix until just combined or no longer visible.
Pour the flour mixture into the bowl with the oil mixture and combine with a silicone spatula until no more dry flour is visible. Fold the carrots into the batter with the spatula.
Pour the batter into the prepared loaf pan and smooth out into an even layer. Bake the cake in the preheated oven for 45-55 minutes, or until a toothpick inserted into the center comes out with no wet batter. Allow the cake to cool in the pan for 10 minutes then transfer it to a wire cooling rack to cool completely by carefully lifting it out of the pan with the parchment paper handles.
Meanwhile, prepare the frosting by beating the cream cheese, butter, and vanilla extract in a medium mixing bowl with a handheld mixer until smooth. Add the powdered sugar and continue beating until the frosting is smooth and creamy.
Spoon the frosting onto the completely cooled cake and use an icing spatula to smooth the frosting out over the top of the cake. Top with ¼ cup of chopped pecans if desired. Slice and enjoy!