Preheat oven to 350ºF. Line a 9x13-inch cake pan with parchment paper, then spray with nonstick cooking spray.
Thoroughly drain the crushed pineapple by pouring into a strainer set over a large glass measuring cup and using the back of the spoon to squeeze out as much juice as possible. You should end up with about 1 and 1/4 cup of juice. Place drained pineapple in a separate bowl; set aside. Add raisins to the drained pineapple liquid, microwave for 1 minute, remove and stir, then return to microwave for another minute. Remove and allow raisins to continue to soak while you make the batter.
In a large bowl, whisk together the flour, baking soda, spices, and salt until combined; set aside.
In the bowl of a stand mixer fitted with the paddle attachment, beat the eggs, granulated sugar, and brown sugar together on medium speed until the mixture becomes thick and creamy, 1-3 minutes. Reduce mixer speed to low and slowly stream in the oil until thoroughly combined. Beat in sour cream and vanilla until smooth.
Remove bowl from mixer and use a spatula to gently fold in half of the flour mixture. Repeat with the remaining flour mixture until most of the lumps are gone--do not overmix.
Drain the raisins, then gently fold into the batter along with the grated carrots and crushed pineapple. Pour batter into the prepared pan, smoothing out the top. Bake for 35-40 minutes, or until a toothpick inserted in the center comes out with few moist crumbs attached. Cool the cake completely in the pan.
Make the Frosting:
In the bowl of a stand mixer fitted with the paddle attachment, beat the butter, cream cheese, and vanilla together on medium-high speed until smooth, 2-4 minutes. Gradually add in the powdered sugar, one cup at a time, and continue beating until creamy.
To Assemble:
Run a knife around the edges of the completely cooled cake, then flip the cake out onto a wire rack. Peel off the parchment paper, then flip the cake right side up onto a cutting board. Cut the cake horizontally so that you end up with three even rectangles that are roughly 9x4 inches each.
Place one cake layer onto the serving platter, then frost/pipe with a third of the frosting. Repeat this step with the remaining cake layers and frosting, then garnish with toasted pecans and coconut, if desired. Cover and refrigerate until ready to serve.
Notes
*Cake can be stored covered in the refrigerator. For the perfect texture and flavor experience, I like to allow the cake to warm up to room temperature before serving, about an hour.