Firstly, there's nothing wrong with Firebase for scalability, not can I see anything wrong with "cheap" - unless you expect to need the more complex tools that MongoDB offers (such as Map/Reduce, GridFS and such), I don't think you would want to pay more to get the same capabilities. That being said, there are advantages to move to an open-source code base that you have the option of hosting yourself - preventing vendor lock-in is a legitimate requirement.
Now, as for hosting MongoDB: there are a lot of providers that will host MongoDB (or compatible, see AWS DocumentDB) for you - AWS, Linode or Digital Ocean all offer managed database as a service, so you don't have to mess with VMs and installing and maintaining your own instance of the database server - they are often also cheaper than just running a VM. There's no need to co-locate the database near the application - all of those managed MongoDB services offer great connectivity so unless millisecond latency is critical for your application, any will do.
That being said, your best bet for starting to work with MongoDB is probably MongoDB's own Atlas service - it is a managed service provider that allows you to select in which cloud hosting provider to co-locate a managed MongoDB instance - they support AWS, Azure, GCP and others. They always have the latest and greatest MongoDB version (they make it themselves) and they even have a free tier for starting development on the cheap.