"As it were," "so to speak" and "if you will"

Do these phrases actually have meaning, or are they pretty much like “uh” or “um.” I think they do have meaning, but it’s more like “ya know what I mean?” Or are they simply pretentious?

All three are tacit admissions that what one is saying is not literally true, but is true if the listener makes certain allowances. Most of the time, the speaker is using a well-known word or phrase in a novel or highly figurative way. Recycling clichés, so to speak.

What is the actual grammar of “as it were” ?

It’s an instance of the subjunctive mood, used (among other things) to discuss a condition that is contrary to fact. “If he were in hospital, I would visit him” is a statement about someone who, in reality, is not in hospital. The subjunctive mood would not be used of somebody actually hospital. (“As he is in hospital, I will visit him.”)

So, “as it were” means “if things were this way”, basically.

Many English speakers don’t use the subjunctive, or use it only rarely. “If he was in hospital, I would visit him” is a common alternative to “if he were in hospital . . .”.

That subjunctive mood is not what I was referring to in the OP. An example would be “The hypochondriac’s disease, as it were, had no medical cause.” The closest I can come to a synonym is “in a manner of speaking.”

In that context, the function of the phrase “as it were” would be to signal that the hypochondriac’s condition under discussion wasn’t actually a disease at all. The phrase might be a verbal equivalent of air quotes around the word disease.

I take “as it were” to be akin to “so called”. It’s a way to signal that you’re introducing a term of reference that you yourself are not endorsing by your use.

So “The hypochondriac’s disease, as it were, had no medical cause.” translates as “Some sources [sup][citation needed][/sup] use the term “hypochondriac’s disease” to refer to this condition. There is no actual medical cause for the condition so described.”
IMO “So to speak” is more akin to the economists’ “all else being equal” or the engineers’ “approximately” or the physicists’ “arm-waving”. It indicates the speaker is making simplifying assumptions but expects the audience will understand and agree to the (unstated) assumptions and accept the rest of the statement as valid enough for the conditions at hand given the assumptions. e.g. “The Fed’s quantitative easing is, so to speak, a subsidy of the stock market.”
IMO “if you will” is “so to speak” with larger, more explicit, & perhaps somewhat counter-factual assumptions. So although it isn’t strictly subjunctive mood, it is going to the same direction. You’re explicitly pointing out to the audience that they need to accept your assumptions or counterfactuals in order to make sense of what follows.