No, for sufficient values of "entirely over the Internet" and sufficient values of "secure." A "global" MitM could sit on everyone's network connections, and create a fake persona for everybody (cryptographic keys, signatures, message-writing patterns, etc.). Assuming no one shares anything offline or over a trusted network, you could never talk directly to any communication partner; everything would go through the MitM, which would replace everything designed to prove veracity.
You can't create trust over an untrusted connection, because you have no way of knowing that all the messages aren't coming from someone else. Trying to create trust from mathematical algorithms is not possible; it's just like trying to create math strictly from mathematical algorithms. You need to have something that is trusted automatically. The only way to actually create trust is through a judgment call.
The issue with doing things entirely online is that a MitM can pass almost everything through. Therefore, just because you get the right info over a wire, doesn't mean no one's tampering with it. You can only trust information you receive if you receive it over an already trusted connection, or if you can link it to information you already trust, or if you just decide that it's trustworthy enough (in which case no evidence supports it, and you need a good enough reason to do so). You can only create a trusted connection by somehow linking it to something you already trust in a secure way (e.g. via cryptographic algorithms), or by deciding to trust it without regard to evidence. There are communication channels that people trust without evidence: in-person communication is the primary one. People often trust government-issued ID documents, which is often used for PGP keysigning (another alternative is trusting that you can recognize your friend in person). However, if there's a global MitM, there are no automatically trusted Internet-based communication channels; if you likewise don't allow preinstalled keys or the like, there's no way to get any trusted electronic communication, which means you can't trust anything (as all communication is assumed to be over the Internet).