Preheat oven to 350°F (175°C) and position rack in the center. Grease a 9x13 inch baking pan with butter or non-stick spray, dust lightly with flour, and tap out excess (or line with parchment paper).
Peel 3–4 medium carrots and grate using the medium holes of a box grater (or food processor). Measure out 2 cups loosely packed and pat gently with a paper towel if very wet.
Empty the cake mix into a large bowl, add the cinnamon and nutmeg, and whisk together for 30 seconds until the spices are evenly distributed.
In a separate bowl, lightly beat the eggs, then whisk in the oil and water until combined and slightly frothy, about 20–30 seconds.
Pour the wet ingredients into the dry ingredients and beat on medium speed for 2 minutes (or whisk vigorously by hand for 3 minutes) until smooth, scraping down the sides as needed.
Using a rubber spatula, gently fold in the grated carrots, and if using, the chopped nuts and raisins, just until evenly distributed — do not overmix.
Pour batter into the prepared pan, smooth the top, and tap the pan on the counter 2–3 times to release air bubbles. Bake for 35–40 minutes (28–32 minutes for round pans), until a toothpick inserted in the center comes out clean or with a few moist crumbs.
Place the pan on a wire rack and cool for 15–20 minutes in the pan, then turn out (if making layers) and cool completely to room temperature, about 1–2 hours, before frosting.
Beat softened cream cheese and butter together on medium-high speed for 2–3 minutes until fluffy, then gradually add powdered sugar on low speed. Add vanilla and salt, then beat on medium for 2 more minutes until creamy and spreadable.
Spread frosting evenly over the completely cooled cake using an offset spatula. Refrigerate for at least 30 minutes before slicing to allow the frosting to set, then slice with a sharp knife, wiping clean between cuts.