A Caramel Custard or Flan has an egg and milk base. If you overcook the custard then the eggs inside the custard effectively start to scramble causing those grainy sides and that eggy taste. A custard is done when the center is still pretty jiggly, even slightly wet to the touch and the sides are set.