The main limitation is the covenant of good faith and fair dealing which applies to all contracts as a matter of law (not just insurance contracts, where the obligation of good faith and fair dealing is enforced and litigated in a different manner) and cannot be waived. This covenant requires someone who has discretion regarding how a contract is performed to do so in good faith relative to the shared intent of the parties regarding the objective of the contract.
This boundary is fuzzy and often not economically meaningful and blurs into questions about the scope of the work authorized as well. But, it can impose common sense limitations in an abusive situation.
For example, it would probably violate the covenant of good faith and fair dealing for a car repair shop to custom rebuild an otherwise falling apart fifteen year old car if the customer made clear that he only wanted the minimum work to keep it running. That would violate the shared objective of the relationship. Many states also require written scope of work approvals for car repairs and there are industry standard guidelines for how long work should take that could be used to address the reasonableness of an invoice as a "reasonableness requirement" would often be implied in law in an open ended work contract.
In a medical context, where the patient was incapable of express consent, billing for emergency treatment would be justified, but billing for unrelated elective procedures would not.
Medical billing is a special case to which a lot of ordinary contract principles do not apply.
The obligation to pay for many medical services, e.g. in an ER, arises from an unjust enrichment or implied-in-fact contract basis, or from a contract reached in advance between the provider and the insurance company for the patient. Often state law specifically provides a statutory right to compensation in accordance with public schedules to get around this question as well.
Similarly, usually a contract isn't valid unless both parties agree to a price in advance, but in the medical billing context it isn't unusual for neither the patient, nor any of the providers, to have any idea what the price for the services renders will be at the time a provider-patient relationship is established and the services are rendered.