Whisk together egg yolks and sugar in a medium saucepan until well blended.
Whisk in milk and cook over medium heat, stirring constantly, until the mixture boils. Boil gently for 1 minute, remove from heat, and allow to cool slightly.
Cover tightly and chill in the refrigerator for 1 hour.
In a medium bowl, beat heavy cream with vanilla until stiff peaks form.
Whisk mascarpone into the chilled yolk mixture until smooth.
In a small bowl, combine coffee and rum (if using).
Arrange half of the ladyfingers in a 9x13 inch dish. Drizzle with half the coffee mixture.
Spread half the mascarpone mixture over ladyfingers, then half the whipped cream. Repeat layers.
Sprinkle cocoa powder over the top and cover.
Refrigerate for at least 6 hours, preferably overnight, before serving.