I have often heard judges ask parties at the conclusion of a hearing on some matter, "Are you satisfied with your attorney's representation of you in this matter?"
What is the consequence of a party answering that question in the negative?
The judge would reject the defendant's guilty plea and proceed to trial.
This is a common part of a plea colloquy, which is a standard (often scripted) conversation that occurs between the judge and a defendant who is pleading guilty to ensure that the plea is voluntary and made with knowledge of its possible consequences. It seeks to ensure that the defendant is aware of what they're charged with and the consequences of their plea, and that they were not improperly pressured into pleading guilty—for example, because they felt that their lawyer wasn't doing a good enough job.
This is required by Federal Rules of Criminal Procedure Rule 11, which requires that:
Before accepting a plea of guilty or nolo contendere, the court must address the defendant personally in open court and determine that the plea is voluntary and did not result from force, threats, or promises (other than promises in a plea agreement)
Many (possibly most/all) US states have similar rules. For example, Pennsylvania law states that "The judge may refuse to accept a plea of guilty or nolo contendere, and shall not accept it unless the judge determines after inquiry of the defendant that the plea is voluntarily and understandingly tendered."
Examples of scripted questions to establish this include:
If the defendant answered that they were not satisfied (and continued to give that answer when informed of the consequences of doing so, as occurred in the below example), the judge would reject the guilty plea and proceed to trial. It's remarkably difficult to find a case in which anyone has actually done this. The only one I could find was this New Jersey case in which the "defendant would not agree on the form that he was satisfied with defense counsel's work." The judge informed the defendant in various ways that this would lead to the plea being rejected and proceeding to trial:
Now, if you are not satisfied with your lawyer, I cannot take your plea bargain, sir. ... The only other thing I can do is schedule you for trial, Mr. Cuevas, which you are entitled to.
Now, if you are not satisfied with your lawyer, I cannot take your plea bargain, sir.
I can't take your plea after you're telling me that you're dissatisfied with your lawyer.
If I can't take your plea because it's not appropriate and it's not legal, the only other thing I can do is schedule the case for trial.