Break the biscuits into pieces about 1 inch across. Crush one handful into fine crumbs and set the crumbs aside for the top.
In a heavy saucepan, whisk the eggs, sugar, flour and cocoa until smooth, then slowly whisk in the warm milk.
Cook over low heat, whisking constantly and reaching into the corners, 10 to 12 minutes, until thick like pudding. Do not let it boil. Off the heat, whisk in the vanilla and let it cool for 10 minutes, whisking now and then.
Line a 10-cup loaf pan or bowl with plastic wrap, leaving an overhang. Fold the biscuit pieces into the custard, pack the mixture into the pan and press it down.
Cover and refrigerate at least 5 hours, preferably overnight, until firm.
Turn the cake out onto a plate, peel off the wrap and cover the top with the reserved crumbs and the grated chocolate. Slice with a knife dipped in hot water.