No other industry entirely hides the end price you'll pay, or even an estimate, until after you have gone through the service. It's a sad state of affairs but not something we have to be stuck with; most of the time we could get these numbers ahead of time.
ER visits are difficult in their own ways; you can be brought in unconscious and go through treatment you can't agree to, you can be close to death and the time it takes to check costs could impact if you live or not. This means you'd want to do something like fixed costs for these services but with good medical coverage for everyone those fixed costs could be what people do in place of insurance.
I don't have an answer other than universal healthcare. There are reasons that this can't happen at the moment and it's still difficult to implement in a way that works across the board. This is a hard problem and will take a lot of effort to get right