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.
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.