How to run Ghost and PrestaShop on the same domain, when hosted on different providers?

Solution 1:

www.example.com can only be pointed at a single provider using DNS.

You could have one provider forward on calls for a subpath to the other provider.

Or you could introduce a third piece to the puzzle. If the one provider is something like Cloudflare, that could then pass traffic for the subpath to one PrestaShop, and the rest to Ghost