It would be just a matter of time before someone starts making larger rams that are capable of doing the job better than the average ram
Or just write it to disk

That's how "proof of space" works: you don't need to access the data frequently, so you don't need to have it in RAM.
There's an alternative that exists already: ACIS-resistant protocols that require a large amount of RAM to mine. It still needs processing power, but you can't really avoid that if you don't want the content of the RAM to be stored on disk.