Having a bad life is good, having a good life is bad. It's an inversion of common sense to make victimhood a virtue. Of course it plays well to commoners who see themselves as victims in societies with great inequality. It's not surprising to me that Christianity became so popular.
I think in both cases (the verse in Luke you mention which I believe is in Mary's Magnificat and this one in James) the idea is that if you were well fed now at the expense of the poor then woe to you - ie. if you exploited the poor so that you could be rich. You can see this theme in the prophets of the Hebrew bible as well. Also, there are wealthy people mentioned in the new testament (contributors to Paul's missions) who are commended for being generous. Wealth in itself isn't condemned, it's hoarding of wealth that's condemned.
So it's bad to be well liked because some of the people who were well liked in the past had wrong beliefs or weren't good people? No sorry, I'd rather be popular. Why can't somebody be popular and good at the same time? Having lots of supportive social connections is good, saying otherwise is serving up cope for people who don't. Of course this plays well for the crowd because most people aren't as well liked as they would wish; Luke says their plight is actually a virtue so they can feel good about not being popular and pity those who are.
Being well liked at the expense of truth is often how the world works, but what's being said here is that it doesn't play well in the upside-down kingdom of God where the first shall be last and the last shall be first.
So there's no way to be well liked unless you tell lies? I don't believe that. I think that's cope for people who aren't well liked to feel morally superior to those who are. It's a form of sour grapes; I didn't want the grapes anyway because they're sour. I didn't want to be popular anyway, because those people are liars.
After all, Jesus dying on the cross is perhaps the most virtuous and aspirational acts.
As it relates to this conversation, it is interesting that the nobility suffering for the sake of others has been simplified to or conflated with simply the nobility of suffering.
Are they? They both follow the form of 'impoverish yourself now to receive rewards later.' Sure, one promises reward in the afterlife and one promises reward in this life, but for those who truly believe the afterlife is just as real as this life, I don't think there's much meaningful difference. To such people, both promised rewards are real and desirable.
"Blessed are those who hunger and thirst for righteousness, for they will be satisfied." Matthew 5:6
This verse isn't talking about physical hunger caused by lack of food. Apparently if you read it in the original greek righteousness and justice are interchangable here. What it's saying is that people who suffer injustice in this life and hunger and thirst for that injustice to be made right will be satisfied.