The flan is cooked when the custard is set around the edges and the center is set but will still be a bit jiggly. It will continue to cook as it cools and the center is completely firm. Do not overcook, as it will cause uneven texture and bubbles.