The sentence:

> 'Doctor' means 'a learned man', **which** I suppose this man is.

is perfectly grammatical, because the antecedent of "which" is "the condition of being a learned man", which -- being a condition -- is not a specific person. The indefinite article makes the noun phrase sound like a quality, as if it were adjectival (the quality of a person) rather than nominal (the name of a person).

Another example:

- I called him a liar, which he is.

There is also a **grammatical** reason why "which" and not "who" or "whom" is correct, and that is the function of the antecedent in the relative clause -- a subject complement:

- I suppose this man is **a learned man**.

- He is **a liar**.

Instead, if the function in the antecedent is "more nominal", so to speak (for example subject or object), then "who" will be used:

- He is so aggressive people call him Hitler, **who** I think was much more cruel than he is. (Hitler was much more cruel.)