The reason why lawyers are 'under appreciated' compared to doctors is actually quite simple.
Whilst the majority of people are not medically trained, the medical profession is a known quantity. When we get sick, doctors make us better. And obviously we're quite happy when doctors make us better, so we hold them in high regard as professionals who are extremely beneficial, as they solve problems that we could not solve ourselves. This is enhanced in the UK because most of that treatment is 'free' in that it is paid for by taxes, so we also don't associate medical treatment with upfront cost.
The situation with lawyers is very different, because in reality most people who require the assistance of lawyers come out of the system feeling in some way aggrieved. Why? Because legal disputes are adversarial by their nature, so unlike the area of medicine where you only ever have doctors working in your best interests, with law there is also a lawyer working against you. In addition, even those who succeed in litigation are rarely entirely happy with the outcome. That's because they have still had to use time and resources disputing something that they believe should have gone there way in the first place.
The result is that you have two parties in litigation. The one that loses feels that the system has betrayed them and that their lawyers didn't do a good enough job (lawyers that they have still had to pay for). On the flip side, the one that wins feels aggrieved at having to spend money on lawyers to secure an outcome that they feel they were entitled to anyway. So actually nobody is happy.
And so we have a situation where lawyers are under appreciated simply because the system within which they work is one that tends to bring out negative feelings in people in some manner more than it does bring positive feelings, and even when people are happy with the outcome they tend to feel aggrieved at having been forced to go through the system anyway. The result is that society develops an inherent bad feeling towards lawyers, hence the under appreciation.