When a Bad Thing happens, you can get someone burned at the stake for it - or you can fix the system so that it doesn't happen again.
AI tech stops you from burning someone at the stake. It doesn't stop you from enacting systematic change.
It's actually easier to change AI systems than it is to change human systems. You can literally design a bunch of tests for the AI that expose the failure mode, make sure the new version passes them all with flying colors, and then deploy that updated AI to the entire fleet.
Or you can not fix the system, because nobody's accountable for the system so it's nobody's job to fix the system, and everyone kinda wants it to be fixed but it's not their job, yaknow?
This isn't really that different from malpractice insurance in a major hospital system. Doctors only pay for personal malpractice insurance if they run a private practice and doctors generally can't be pursued directly for damages. I would expect the situation with medical robots would be directly analogous to your 737 Max example actually, with the hospitals acting as the airlines and the robot software development company acting as Boeing. There might be an initial investigation of the operators (as there is in an plane crash) but if they were found to have operated the robot as expected, the robotics company would likely be held liable.
These kinds of financial liabilities aren't incapable of driving reform by the way. The introduction of workmen's compensation in the US resulted in drastic declines in workplace injuries by creating a simple financial liability company's owed workers (or their families if they died) any time a worker was involved in an accident. The number of injuries dropped by over 90%[1] in some industries.
If you structure liability correctly, you can create a very strong incentive for companies to improve the safety and quality of their products. I don't doubt we'll find a way to do that with autonomous robots, from medicine to taxi services.
[1] https://blog.rootsofprogress.org/history-of-factory-safety
No one. Because you can't point the finger at any one or two individuals; decision making has been de-centralized and accountability with it.
When AI robots come to do surgery, it will be the same thing. They'll get personal rights and bear no responsibility.