Place the white chocolate in a heat-safe bowl and melt gently (microwave at 50% power in 20–30 second bursts, stirring between each). Set aside to cool to room temperature. Preheat the oven to 345°F (175°C) and line two muffin pans with 16 paper liners.
Cheesecake swirl: Beat the cream cheese and granulated sugar until completely smooth, 1–2 minutes. Mix in vanilla, lemon zest, then the egg just until combined (do not overbeat). Refrigerate the mixture for 10 minutes to firm slightly.
Whisk the dry ingredients for the cupcakes: flour, cocoa, espresso powder, baking powder, baking soda, and salt. Set aside.
In a large bowl, whisk the eggs and sugar until slightly thick and lighter in color, about 1 minute. While whisking, slowly stream in the vegetable oil, then the cooled melted butter until glossy and emulsified. Whisk in the vanilla and sour cream until smooth.
In a measuring cup, stir together the buttermilk, vinegar, and red gel color until the liquid is evenly tinted. Add half of this red buttermilk to the egg mixture, whisk to combine, then add half of the dry ingredients and fold gently. Repeat with remaining red buttermilk and dry ingredients, stirring just until no flour streaks remain.
Fill each liner a little under 2/3 full with batter. Dollop about 1 tablespoon of the chilled cheesecake mixture into the center of each cup. Top with a small spoonful of batter if needed, then lightly swirl a few zig-zag passes with a toothpick, keeping the swirl away from the paper edges.
Bake 17–19 minutes, rotating the pans front to back at 12 minutes. Cupcakes are done when the cake portion springs back and a toothpick inserted into the cake (avoid the cheesecake pocket) comes out with a few moist crumbs. Cool in the pan for 10 minutes, then transfer to a rack to cool completely.
Frosting: Beat the softened butter on medium speed until creamy, about 1 minute. Add the softened cream cheese and beat until smooth and lump-free, 1–2 minutes, scraping the bowl. Mix in the cooled melted white chocolate until fully incorporated.
Add the powdered sugar gradually on low speed, then the vanilla. Increase to medium-high and whip until light and fluffy, 45–60 seconds. If the frosting feels soft, chill it for 10–15 minutes and beat briefly before using.
Pipe swirls of frosting onto the cooled cupcakes with a large star tip and finish with sprinkles if desired.