The agreement among plaintiffs lawyers and medical groups avoids what would have likely been a costly campaign over a November ballot initiative.