Position oven rack in bottom third of oven. Preheat oven to 325°F (170°C). Line a 9-inch square baking pan with foil, letting excess extend over sides of pan. Spray foil with cooking spray.
For brownie: In the top of a double boiler, heat all chopped chocolate and butter over simmering water, stirring occasionally, until melted and smooth. Remove from heat, and whisk in granulated sugar and brown sugar. Let cool slightly.
In a medium bowl, whisk together flour, cocoa, salt, and espresso powder.
Whisk eggs and vanilla into chocolate mixture until combined. Fold in flour mixture until just combined. Spread batter into prepared pan.
Bake just until top is dry, 20 to 25 minutes.
Meanwhile, for cheesecake: In the bowl of a stand mixer fitted with the paddle attachment, beat cream cheese at medium speed until smooth and creamy, 1 to 2 minutes, stopping to scrape bottom and sides of bowl. Add granulated sugar; beat until well combined, 1 to 2 minutes, stopping to scrape paddle and bottom and sides of bowl. Add egg and egg white, one at a time, beating until well combined. Beat in extracts.
Spread cheesecake mixture onto brownie layer. Top with cherries.
Bake until edges are set, top looks dry, center is almost set, and an instant-read thermometer inserted deep in center registers 194°F (90°C), 45 to 55 minutes, loosely covering with foil to prevent excess browning, if necessary. Let cool completely in pan on a wire rack. Refrigerate in pan overnight, loosely covering with foil only when completely cool to prevent condensation from forming.
Using excess foil as handles, remove from pan, and cut into bars. Garnish with shaved chocolate, if desired. Refrigerate in an airtight container for up to 3 days.