(8-ounce/226-gram) block cream cheese, softened
packed cup/73 grams confectioners’ sugar
teaspoon fine sea salt
cup/120 grams sour cream
- Heat oven to 375 degrees. Lightly coat an 8-inch square baking pan with cooking spray. Line the bottom and sides with parchment paper, and spray again.
- Make the topping: Whisk the cream cheese in a large bowl until smooth. Add the confectioners’ sugar and salt, and stir slowly with a whisk until no traces of sugar remain, then whisk rapidly until smooth. Add the egg and whisk until fully incorporated, then whisk in the sour cream until smooth. Using a silicone spatula, scrape the mixture into a pastry bag fitted with a 1/2-inch plain tip or a gallon-size resealable plastic bag, and set aside. Reserve the bowl, whisk and spatula without washing.
- Make the cake batter: Combine the eggs and granulated sugar in the reserved bowl and beat with the whisk until evenly combined. While whisking, add the oil in a steady stream and whisk until emulsified. Add the flour, spice, baking powder, baking soda and salt, and use the spatula to fold into the wet ingredients just until the dry ingredients disappear. Add the carrots and fold until evenly distributed.
- Scrape the cake batter into the prepared pan and spread evenly. If using a plastic bag, snip a 1/2-inch hole in a lower corner. Pipe the topping gently and evenly over the batter to completely cover it. It’s OK if it looks bumpy; it will even out in the oven.
- Bake until the top is golden brown and a toothpick inserted in the center comes out with bits of the topping but no cake batter, 50 to 60 minutes. (If your cream cheese layer doesn’t take on very much color by the time the cake has finished cooking, you can broil it until the top is browned in spots, 1 to 2 minutes.)
- Cool completely in the pan on a wire rack. Cut directly in the pan to serve, or slide out of the pan using the parchment paper to cut into squares. The cake can be refrigerated in an airtight container for up to 5 days. Bring to room temperature before serving.