Preheat your oven to 350°F. Grease and flour two 9-inch round cake pans (or one 9x13-inch pan if you prefer a single-layer cake). Set aside.
Mix dry ingredients- In a large bowl, whisk together the flour, baking powder, baking soda, cinnamon, nutmeg, and salt.
Combine wet ingredients- In a separate bowl, whisk the softened butter and sugar together until well combined. Add the eggs, one at a time, mixing after each addition. Stir in the vanilla extract.
Mix the batter- Gradually add the dry ingredients to the wet ingredients, mixing just until combined. Be careful not to overmix. Fold in the grated carrots, nuts, and raisins (if using) until evenly distributed throughout the batter.
Bake the cake- Pour the batter evenly into the prepared pans and smooth the tops. Bake for 25-30 minutes for round pans (or 35-40 minutes for a 9x13-inch pan), or until a toothpick inserted into the center comes out clean. Allow the cakes to cool in the pans for 10 minutes, then transfer them to a wire rack to cool completely.
Make the orange cream cheese frosting- While the cake is cooling, make the frosting. In a medium bowl, beat the softened cream cheese and butter, with an electric mixer, until smooth. Gradually add the powdered sugar, mixing until fully combined and creamy. Stir in the orange zest and orange juice.
Assemble the cake- Once the cakes are completely cool, place one layer on a serving plate. Spread a generous layer of the orange cream cheese frosting on top, then place the second layer on top. Frost the top and sides of the cake as desired. If you made a single-layer cake, just frost the top and enjoy!