Preheat oven to 325°F (170°C). Spray an 8-inch square baking pan with cooking spray. Line pan with parchment paper, letting excess extend over all sides of pan.
In the top of a double boiler, heat chocolate and butter over simmering water, stirring occasionally, until melted and smooth. Turn off heat, and whisk in sugars until well combined, 1 to 2 minutes. (Mixture will not be completely smooth.) Remove from heat, and let cool for 5 minutes.
In a medium bowl, whisk together flour, cocoa, salt, espresso powder, and baking powder.
Gradually add eggs to chocolate mixture, whisking until combined. Whisk in vanilla. Fold in flour mixture just until combined. Spread batter into prepared pan.
Bake until a wooden pick inserted in center comes out with a few moist crumbs, 45 to 50 minutes. Let cool in pan for 15 minutes. Using excess parchment as handles, remove from pan, and let cool completely on a wire rack. Cut into bars. Store in an airtight container for up to 3 days.