What can academia do with the flood of bad or subpar paper currently online? I am currently researching some STEM-related topic on X, and I have been bombarded with a flood of bad papers on Google or academic databases.

Of course, bad is subjective. But I am talking about papers that don't even have proper font or typesetting, virtually no equations/equations that don't make any sense, poor examples, and papers that are literally less than three pages long (standard are 10 pages): introduction, some made-up equations, one experiment that those equations does well on, conclusion - we have solved the problem. 

In addition, many of these papers are published in low-tier journals and conferences (with very legit sounding titles, mind you, such as "International Conference on Advances in Computing, Communications and Informatics") and it is taking a while for me to dig through them to find quality content. 

On top of it, there seems to be a flood of student projects on these topics that are otherwise properly formatted in conference style templates. I am guessing a lot of undergraduate courses are making their students learn how to write a paper as their project, and the students, in turn, publish them somewhere. Unfortunately, almost all of these papers are poor quality and totally not peer-reviewed. They show up in search anyways. 

Is there anything academia can do to solve this problem? I can only see it get worse and worse over time until it is totally impossible to properly cite previous work.
I strongly suspect that along with the papers being poorly formatted, they also have minimal usefulness content-wise.  I think the way to solve your problem is just to use a filter of only looking at papers in peer-reviewed, properly formatted journals.  And the better ones, at that.  

Yes, there is a possibility you miss something, but so what?  Euclidean perfection is not expected.  If you are doing original work, you only have limited time to spend on literature and you need to use that most efficiently.  Even if your sole task is to review the literature, you have limited time to do that.

If there is some work that was self published or poorly written but still important, than it should have been recognized (via citations) by papers in good journals.  (Then, recognizing the importance, you can spend the time to decipher the poor exposition...but again, this will be a tiny fraction.  Often zero.)

So, instead of worrying about academia (not a monolithic entity) somehow cleaning up the Augean stables for you (how would they even do that...take control of the Internet?), just change your own work habits to stay out of the muck or be very limited and targeted in your plunges into it.