"I mean", like other discourse particles, is tough to nail down. But every discourse element does serve a function, it is just normally a function that is a bit different from other types of words.
Here is some current theory on what "I mean" means. All of my information comes from Fox Tree & Shrock (2002).
The paper has a slightly different focus, so I am picking out part of the article that summarizes some of the literature that explores possible discourse functions of I mean (so don't consider this a complete summary of that paper).
I mean may be used more by some speakers, and in some kinds of talk, because these speakers, or these speakers in these situations, are more willing or able to make adjustments on the fly.
I mean may be more common in thoughtful and opinionated talk...if speakers are being more careful about expressing exactly what they mean to express, and so using I mean to adjust their speech. This may also be true of narratives. On the other hand, I mean may be more common in conversations than in interviews, if speakers are talking more spontaneously in conversations. If talk is planned in advance, or considered carefully before articulating, as it might be in interviews, there is less need for on-the-spot adjustments. Likewise, I mean may be linked with positive politeness because using it reminds conversational participants of more casual talk. At the same time, it may be linked to negative politeness by decreasing face threat; saying I mean may be like saying "I'm not committed to what I just said and will adjust if you are offended."
This article also mentions some research into "I mean" as a device used to assist turn management in a conversation (i.e. how the back-and-forth of a conversation is managed). Specifically, "I mean" can be used when Speaker A takes another turn talking, and wants to indicate that Speaker A is "skipping" what Speaker B just said and continuing the thought that Speaker A was conveying before Speaker B talked. For example, imagine this spontaneous spoken conversation, where each line almost interrupts the one before it:
A: Cats aren't the most loving pets, are they?
B: Personally I find dogs more annoying than cats...
A: I mean... they can't even really be trained and they just hang out on their own....
(The above is my example — I hope it's clear what I am talking about.)
Other uses mentioned in the article:
I mean's use in repair conforms with its basic meaning to forewarn upcoming adjustments. With a broad view of repair that extends beyond local phonological or syntactic adjustments, this basic meaning can accommodate many of the other observations, such as that I mean forewarns parenthetical remarks or a change of mind (Erman, 1987: 175). The forewarning adjustments function treats the predictability or the local-globalness of repairs as irrelevant, so the conflicting findings presented earlier pose no threat.
The forewarning adjustments function also sits well with speakers' increased monitoring of addressee comprehension after an I mean. If speakers have just forewarned an adjustment, they might seek an acknowledgement of understanding from the addressee after the adjustment has been made.
Forewarning adjustments can also account for I mean's uses in topic shifts, such as introducing commentary, justification, phrasal level modification, and new information.