Consent is always a valid legal basis for the processing, or transfer, of data. But it has to be freely given, specific, informed and unambiguous.
And though hacker news likes to be extreme and say "good" to things like this, there is an unbelievable amount of freely available information on the internet. If you had to pay a subscription by site, how many sites would you be willing to pay for? More importantly, how many would the average person pay for?
For other websites, they can ask their community for support. Then maybe we will learn, that we need to pay for good services, or they disappear. That would be better in my opinion than unconsensually becoming the product as the user of the service, because of companies siphoning off personal data and selling to the highest bidder.
Somewhere along the way, we might also realize, that democracies have an interest in having some kind of good news coverage and information pages online. Countries can pay for that. There can be a general tax for maintenance of websites, which are important for the public. I guess this already exists indirectly, because people pay taxes and that money is used to pay people, who work for cities, states and so on and for paying for servers.
I have been running a server for a year or two. Paying for that myself. I get a wage every month from the job, so I can pay for a server. Theoretically I could run lots of services on that server and still only pay the same amount every month. For dedicated people in IT sector wages are often good and they can afford to run a few things out of their own pocket. My guess is many people would do that. Not every website needs to be "financing itself". It is not always about the money. Some people simply want to make a nice thing and are OK with paying for it.
So there are many ways, in which websites can exist without the incessant ads spam and bloat, that we see today.
Besides all of that, ad business is often make-believe by the big players, giving wrong impression of how much an ad actually helps your business and improper conclusion drawing from statistics by marketing departments, instead of data analysts. Funny ones are things like "conversion rate", which doesn't work for a huge percentage of people visiting the website with standard ad blocking solutions. They are not even aware of all those people, because their frontend JS-based tracker wasn't even loaded. In one of my own projects, I saw a block rate of close to 60%. Granted, the targetted audience was quite technical in nature, so they were more likely to have ad blocking solutions in place. But this can show you how far off you can be by just looking at some analytics stats. How many marketing departments are capable of running a proper A-B-test? How many of them have the necessary statistics background to run any study properly and then draw correct conclusions?