The economics of the coin address this. It's a fairly complex system. Lots of issues but solid progress due to some recent devs and contributors.
Additionally contributions toward BOINC are not used to secure the ledger due to the security hole you point out but again look at the economics to learn more. Proof of Research is not a real thing.