What makes you think you were screwed over? You applied for a new job and you didn't get it, someone else did. Sorry but there is nothing in your OP to suggest that the process or outcome was unfair in any way.
But, I would expect that any reasonable employer to provide you with open honest and constructive feedback as to your interview or test performance etc etc.
When you say the successful applicant was less qualified than you, you need to ask yourself, precisely what you mean by that and why you say it. I am not trying so sound like and ass (admittedly not doing a very good job), but it is a simple expression that we all use and it has just struck me that I don't really know what it means.
It is your perception of the situation and not necessarily the truth, do you really understand what skills your employer was looking for?
In many companies and roles today so much more emphasis is being placed on core behavioural demonstrative competencies, than 10 or 15 years ago. Not true for all jobs, but true for many especially if no professional qualification is required (e.g. accountant, HR, procurement, plumber, welder etc etc).
It is often the softer skills that are most valued. Now I may be wrong but when people state that they were more qualified than person X then for me they may have completely missed the point.
But I would ask again for feedback.
EDIT. Whooops - I didn't see the OPs second post. Sorry OP