Brew espresso, cool to room temperature. Stir in rum or Marsala. Pour into a shallow dish.
Whisk egg yolks, half the sugar, and water over simmering water for 8 to 10 minutes until pale, thick, and doubled in volume (about 160 degrees F). Cool to room temperature.
Beat room temperature mascarpone briefly until smooth. Fold in cooled egg yolk mixture gently.
Whip cold heavy cream with remaining sugar and vanilla to soft-medium peaks. Fold into mascarpone mixture in 2 to 3 additions.
Line a springform pan with parchment. Quickly dip ladyfingers (1 to 2 seconds per side) and arrange in a single layer.
Spread half the cream over the ladyfingers. Repeat with a second layer of dipped ladyfingers and remaining cream.
Cover and refrigerate at least 6 hours, ideally overnight.
Release springform sides. Dust generously with cocoa powder. Add chocolate shavings if desired. Slice and serve.