Some of the best economists in history are or have been committed intellectuals, engaged with the issues of their time. I think of John M. Keynes, Albert O. Hirschman or Amartya Sen. In one way or another, they tried or are trying still (Sen) to influence public policies more or less directly, and they showed their support for better democracies and fairer societies. In a very nice Twitter thread and blog post, Oliver Kim summarized the life of Hirschman, a young socialist who went to Spain to fight with the Republicans, and who, later as an economist, always had in mind a commitment for a better society. That is quite different from the portrait of the ideal economist that is sometimes promoted by the mainstream of the profession, obsessed with economics as a cold and technocratic science. It must aspire to high scientific standards of course, but that is not incompatible with having a soul as a social science. In recent times, Paul Krugman has probably played the role of the economist as a public intellectual, which is not necessarily the same as blindly following some party line.
This role of economists as public intellectuals is not the same as playing the role of a star economist abusing somehow of expertise. Some of these star economists have become a version of populist intellectuals, as explained in a recent academic article ("Populism with a Ph.D: education levels and populist leaders," written by Claudia Franziska Brühwiler and Katherine Goktepe). One example they give is of Yannis Varoufakis, the former Greek minister. I have other more local versions in mind. There are several varieties of this populist intellectuals, some more narcissistic than others, none of them admitting that they have ever been wrong. I can’t imagine Hirschman in the pages of gossip magazines or exchanging insults in Twitter.