Preheat oven to 325 degrees F. Lightly spray an 8X4-inch loaf pan with non-stick spray; set aside. In a medium bowl whisk together the flour, pumpkin pie spice, baking powder, baking soda, and salt; set aside.
Whisk together the butter, granulated sugar, brown sugar, eggs, and vanilla together in a large mixing bowl until smooth and combined.
Whisk in the dry ingredients until combined, and no flour pockets remain. Fold in the carrots, raisins, and nuts (if using).
Pour the batter into the prepared loaf pan. Bake until a toothpick inserted into the middle of the cake comes out clean, about 50-60 minutes. Cool the cake in the loaf pan for 10 minutes. Then, remove the cake and cool it completely on a wire rack.
FOR THE FLUFFY CREAM CHEESE FROSTING:
Beat the butter and powdered sugar with a mixer on medium speed until light and fluffy, about 2-3 minutes. Add the cream cheese and vanilla and mix until no lumps remain and the mixture becomes light and fluffy again, about 2 more minutes.
Frost the loaf cake with a thick and even layer of frosting, and sprinkle with toasted pecans or walnuts (optional).