Make the cakes
Combine the carrot juice and ginger in a medium saucepan and bring to a boil over medium heat. Boil until reduced to 3/4 cup, about 25 minutes. Let cool to room temperature.
Position a rack in the center of the oven and heat the oven to 325°F. Butter and flour 8 baba au rhum molds (2-1/4 to 2-1/2 inches tall), Set aside on a large rimmed baking sheet.
In a medium bowl, whisk the flour, allspice, cinnamon, star anise, baking soda, and salt. In a large bowl with a hand mixer or in a stand mixer fitted with the paddle attachment, cream the butter and brown sugar on medium speed until light and fluffy, 1 to 2 minutes. On medium-low speed, add one of the eggs, mix until mostly blended, and then add the second egg. On low speed, alternate adding the flour mixture and the carrot reduction in two additions each. Mix each addition until just combined.
Spoon the batter into the prepared molds, filling each a little more than half full. Swirl the batter with a skewer to smooth the tops. Bake the cakes until a cake tester inserted into the centers comes out clean, 20 to 22 minutes. Cool the cakes on a rack for 10 minutes and then carefully invert to remove from the molds. Cool the cakes upright on the rack. The cakes may be served warm or at room temperature.
Make the candied carrots
Bring the sugar and 2 cups of water to a boil in a medium saucepan over high heat. Add the carrots, cinnamon stick, and star anise. Reduce the heat to maintain a simmer; simmer gently, stirring occasionally, until the carrots are translucent, soft, and slightly sticky to the touch, about 30 minutes. Discard the cinnamon and star anise. Remove the carrots with a slotted spoon and set aside. Reserve the syrup.
To serve, dip each cake in the syrup for about 3 seconds, put it on a dessert plate, and drizzle with about 1 tsp. syrup. Garnish with the candied carrots and pistachios.
You can make the cakes up to 1 day ahead and the candied carrots up to 2 hours ahead.