Whisk the sugar and cornstarch together in a saucepan, then whisk in the milk until smooth.
Cook over medium heat, stirring constantly, until it thickens and comes to a gentle boil.
Whisk a ladle of the hot mixture into the beaten eggs to temper them, then return it all to the pan and cook another minute, stirring, until thick.
Off the heat, stir in the vanilla, then press plastic wrap onto the surface and cool slightly.
Layer the vanilla wafers, sliced bananas and warm custard in a dish, repeating to finish with custard, and chill for at least four hours.
The wafers soften into a cake-like layer as it chills, so make it ahead.