I'm afraid there is no quick solution. Your app will have to write to both temporarily and make the switch, no way around adding logic to it.
Even if a multi-DB polyglot proxy/gateway exists, you'd still have to specify the relations, constraints, etc... at which point you'd better do that in your app to avoid lock-in.
Google for "mongodb to postgres downtime". I've found a few detailed articles.