The security situation with SSH is actually kind of dismal. You're right that standard SSH server configurations are generally equivalent to self-signed certificates but the trust model often used there is known as TOFU ("trust on first use") and is regarded
by people who practice computer security as fundamentally broken. It persists only because the problem is hard to solve
and it is still better than nothing
and SSH gets targeted for MITM a lot less than HTTPS (SSH is targeted much more by drive-by attacks looking for weak passwords).
TLS with Web PKI is a significantly more secure system when dealing with real people, and centralized PKI systems in general are far more scalable (but not hardly perfect!) compared to decentralized trust systems, with common SSH practices near the extreme end of decentralized. Honestly, the general state of SSH security can only be described as "working" due to a lack of effort from attackers more than the hygienic practices of sysadmins.
Homoglyph attacks are a real problem for HTTPS. Unfortunately, the solutions to that class of problem have not succeeded. Extended Validation certificates ended up a debacle; SRP and PAKE schemes haven't taken off (yet?); and it's still murky whether passkeys are here to stay. And a lot of those solutions still boil down to TOFU since, essentially, they require you to have visited the site at least once before. Plus, there remain fallback options that are easier to phish against. Maybe these problems would have been more solvable if DNSSEC succeeded, but that didn't happen either.