How much would it cost to remove pay-walls? Is there any research/study/survey/... that tried to estimate how much it would cost to remove paper pay-walls so that all existing research papers are made publicly available free of charge?

E.g. France paid Elsevier 172 million EUR (mirror) so that 476 universities and medical center can have legal access to 2000 journals for five years. I wonder how much it would cost to buy the access to all papers so that anyone can access then.
Zero. The government of the nation you live in can pass a bill that mandates that all (existing and future) published research papers are made publicly available and redistributable.