If you're making a custard in the oven, you really need a bain marie (water bath). What it does is act as an insulator and deliver prolonged gentle heating to the custard. Otherwise, the outer edges will dry out and be tough as boot leather before the inside is set.
The alternative is to cook the pudding in the top of a double boiler. Just put a bowl over a saucepan of boiling water and stir/whisk constantly.
Direct heat is a real problem for egg-based custards.
Pain is inevitable. Suffering is Optional.