there are many medium size banks that have a mainframe or two at the heart of their system.
There might be less mainframes in total, though. The bank where my parents worked had 4 at different sites, but now runs on a single one, AFAIK.
Right. The main limitation is the core software platform. This is an extraordinarily complex system that requires expensive regulatory sign-off/audit/etc.
There are some vendors in the space who are trying to do a new bank + new core. Even if someone had an awesome x86 clustered core system with 100% regulatory approval, any existing mid-tier bank converting to it would be an ~8 figure ordeal.