If the custard is stuck, you can use a thin knife to loosen it, but it will likely leave a scar. See how to unmold custards and flans for another option that may provide a better result.