Preheat oven to 350 degrees and grease a 9x13 inch baking dish or two 9"inch round cake pans. In a large bowl, beat the first six ingredients until well blended. In another bowl, mix the flour, baking soda, cinnamon, nutmeg, and pecans if using; gradually beat into carrot mixture. Pour mixture into prepared pan.
For a 9x13 cake bake for 35-45 minutes, for 9" round cake pans cook for 25-35 minutes, or until a toothpick inserted in center comes out clean. You can cover it with foil towards the end if the top looks like it's getting too brown. Cool completely in pan on a wire rack. If freezing, see notes.
For the frosting: In a large bowl, beat the cream cheese, butter and vanilla until blended. Gradually beat in powdered sugar until smooth adding a little milk if needed. Spread over cooled cake and topped with pecans if desired. Cover and refrigerate until serving. If making a layer cake, you will need 1.5x the frosting.
Notes
FREEZING:
You can freeze the cakes up to three months. Bake as directed and let cool. Wrap in plastic wrap and freeze. When ready to use frost frozen cake and let sit at room temp until using or frost and store in the fridge.