What does it mean?
What does it matter?
What do you care?
Whatever "what" is, it isn't identical across these three sentences.
The sentence "what does it mean" is the simplest case. This "what" is a direct object. It is an interrogative pronoun. We can separate the question per se from the rest of the clause: "It means something, but what?" In this version, "something" is the direct object, and both "something" and "what" share their referent. That referent is an implicit antecedent and the heart of the question. Finding the referent is the same as answering the question.
The remaining sentences do not demonstrate the same relationship. Neither "It matters something, but what?" nor "You care something, but what?" make sense. Neither of these verbs expect a direct object. As that role isn't available, the "what" must serve in some other role.
The meaning of the sentence "What do you care?" differs from such sentence as "What do you care about?" and "What do you care for?" I don't expect that the elision of a preposition alone can explain the role of "what" in "What do you care?"
However, a more extensive elision stands as a possible explanation. We can paraphrase "What does it matter?" and "What do you care" as "In what way does it matter?" and "In what way do you care?", respectively.
Adverbs in general can be paraphrased as prepositional phrases:
Why does it matter? For what reason does it matter?
How does it matter? By what method does it matter?
When does it matter? At what time does it matter?
Where does it matter? In what place does it matter?
? What does it matter? In what way does it matter?
Even the rhetorical use of this question makes sense from this perspective. The assumed answer of the rhetorical "What does it matter?" is that it doesn't matter in any way. The non-rhetorical use of this question is more informative:
Interrogative adverbs are as easy to separate from their clauses as interrogative pronouns:
It matters, but why?
It matters, but how?
It matters, but when?
It matters, but where?
*It matters, but what?
Whatever this "what" is, it doesn't behave like an adverb any more than it behaves like a pronoun. Those two categories succeed where this example fails. It does behave like an adjective in the middle of an otherwise elided preposition phrase, but that seems too complicated an explanation for a sentence that appears so simple on first reading.
Calling it an elision shares a common problem with calling it an idiomatic construction. These explanations, even if true, cannot be proven. We arrive at them by exhausting all other obvious possibilities, never knowing whether more sensible possibilities are simply not quite so obvious.
(1) Is the "what" really an adverb as classified in most dictionaries?
(2) If not, what's the proper part of speech of the word?
Dang, I dunno. Mebbe none.