There are two things here.
If it's concerning Scrum, it's the Scrum Master's job to make sure they support the Product Owner - and not just the Product Owner, but everyone in the Scrum team - for establishing Scrum as defined in the Scrum Guide. The Scrum Guide mentions ways in which the Scrum Master serves the Product Owner.
But there is a limit to that. And this is where the second thing comes in.
You are asking:
Who is responsible for ensuring that the Product Owners are professional and understand how to do their job well?
But it seems the problem you have would be better expressed with this question:
Who is responsible for ensuring that the EMPLOYEES are professional and understand how to do their job well?
This is a far more difficult question to answer, but it seems to me this is the issue here.
A Product Owner needs to do a lot of things. And it's a different skill-set than that of a Scrum Master (and a different role all together in Scrum). Do you really expect a Scrum master to fill in all of the gaps that a Product Owner can have if they are an employee that was hired or placed in a job that they don't know how to perform?
In order to bring in good Product Owners, the hiring managers need to be able to identify what "good" means. In a company that doesn't really understand Agile or Scrum but are just going through the motions, this will not result in a good outcome.
When Moving to Scrum, many just focus on filling in a position (you need developers, a Scrum Master, and a Product Owner, right? Because that's what Scrum says). So they don't pay attention to the actual responsibilities and accountabilities and skills to match. Is just job titles. So you end up with Project Managers as the Product Owner or even as the Scrum Master, or other people that have never had the role, but now they have a new job title. And as you've noticed, the job titles means squat.
How do you solve the problem? Management needs to get on board.
They need to understand that Agile is a new mindset, that it's not doing the same old thing but talking about it using fancier words or referring to new job titles. They need to bring in coaches to teach them how to select good Product Owners and good Scrum Masters. If management do not support Agile, do not understand it and do not stand behind it, then as the first comment on your question mentions, everything will be an uphill battle. Even bringing in the coaches can backfire if they don't know who to bring in (I've seen my share of coaches who had no idea what they were preaching).
So that's the situation. And you already know your options.