Does the word ‘hard-boiled’ have a positive connotation?
Upon a quick google search 'hard-boiled' means tough and cynical even though it doesn't say that this is a disapproving term. One of the synonyms of this word is 'hardened' which means 'very experienced in a particular job or activity and therefore not easily upset by its more unpleasant aspects' which seems like an admirable quality to have for likes of a soldier, militant or an inspector. But such a person would be labelled callous or uncaring about other people's feelings which is confusing me as this is unlikable quality to possess. Or is it that two different words can mean the same but still have different connotation?
Two examples:
That blood-shed would make even the most hard-boiled soldiers cry (Positive connotation)
The American Heritage Thesaurus defines hard-boiled, completely lacking in compassion (Negative connotation).
Depends on how you like your eggs.
Different situations call for different attitudes. Hard-boiled would be hard for a young girl to take as a compliment. Unless she's your divorce attorney.
So yes, just like your examples, it has positive and negative connotations. It just depends on how you feel.
Connotation
an idea or feeling that a word invokes in addition to its literal or primary meaning.
"the word “discipline” has unhappy connotations of punishment and repression"
synonyms: overtone, undertone, undercurrent, implication, hidden meaning, nuance, hint, echo, vibrations, association, intimation, suggestion, suspicion, insinuation
"there was a connotation of distrust in his voice"
google.com
As a parent, would you prefer a paediatrician who is “hard-boiled” or “caring”? A hard-boiled paediatrician implies that the doctor is unemotional, but extremely practical. A doctor who is unaffected by the sight of children suffering, and just performs their job in a no-nonsense way. This lack of sentimentality could be a positive trait in the medical profession, but more likely, as patients and family members of sick children, we would perceive this doctor in a negative light.
As a general, would you prefer a soldier who is “hard-boiled” or “caring”?
A hard-boiled soldier, on the other hand, implies that the person has been toughened by the experience of killing and fighting on field. To me, that soldier sounds as if he or she performs their duty in a slick, cold, and highly-efficient manner. This lack of sentimentality could be perceived as a positive, or even an essential trait of a good soldier.
The following Ngram shows that speakers associate hard-boiled with cynical, realistic, tough, cold, and lastly, practical. None of these adjectives suggest a warm caring person.
The next Ngram displays some of the most common words (excluding egg and eggs) linked with hard-boiled. Google seems to favour hard-boiled detective fiction and describes the literary genre as
a tough, unsentimental style of American crime writing that brought a new tone of earthy realism or naturalism to the field of detective fiction. Hard-boiled fiction used graphic sex and violence, vivid but often sordid urban backgrounds, and fast-paced, slangy dialogue
TV tropes has a page dedicated to Hardboiled Detective
A tough, cynical guy with a gun and a lot of Street Smarts, who solves mysteries with dogged persistence rather than astounding insight,
There were no results for “hard-boiled paediatrician” or “hard-boiled doctor”
Returning to the OP's first example, where it is argued that the following use of hard-boiled carries positive connotations, I would disagree.
That blood-shed would make even the most hard-boiled soldiers cry
What it means is that despite being the tough and unsentimental, these soldiers would be moved to tears if they witnessed that amount of blood shed. The adjective hard-boiled is used in juxtaposition with the soldiers' tears i.e., compassion.