The analysis in CoGEL (A Comprehensive Grammar of the English Language, Quirk et al., 1985 edition) does not agree with CGEL, and provides, I believe, the right point of view. "Here" and "there" are not to be considered as subjects since they are adverbs. The fact that "me" is an accusative form in standard grammar means little: this answer makes that clear.
18.23 Subject-verb inversion
The clause patterns SVC and SVA have their obligatory third
element in large measure because the V is commonly of itself so lacking in
communicative dynamism:
SVC: Her oval face was especially remarkable. [1]
SVC: The sound of the bell grew faint. [2]
SVA: His beloved body lies in a distant grave. [3]
In consequence, where information processing makes it desirable to front
the third element concerned, the result would tend to be bathetic or misleading
if normal order were preserved with the SV, suggesting that a nuclear focus
be placed, inappropriately, on the verb:
CSV: ? Especially remarkable her oval face was. [1a]
CSV: ? Faint the sound of the bell grew. [2a]
ASV: (?) In a distant grave his beloved body lies. [3a]
If these were not to be dismissed as merely bad style, we would tend to read [1a] as equivalent to '… certainly was'; [2a] as 'growing louder, though nonetheless faint'; [3a] as 'being in a prone posture' (rather than, say, foetally curved). In consequence, such fronting naturally carries with it the inversion that puts S in final position, and indeed it is to achieve end focus on the S that the fronting is generally undertaken:
CVS: Especially remarkable was her oval face. [1b]
CVS: Faint grew the sound of the bell. [2b]
AVS: In a distant grave lies his beloved body. [3b]
These particular examples have a rather mannered tone (poetic in the case of [2b] and [3b]), but the phenomenon is common enough in ordinary informal speech:
- Here's the milkman.
- Here comes my brother.
- And there at last was the book I'd been looking for.
- (The jets caused a great gust of wind and) off flew their hats.
- Down came the rain.
- Up went the flag.
In these instances with here/there + be, indeed, it is not simply a matter of stylistic choice: there is a sharp difference of meaning from the alternatives with SVA order. Although we must ditinguish these from existential there, there is in fact a close simîlarity. In contrast to ASV, the SVA order invites us not merely to put the nuclear focus upon the A but to see these adjuncts as referring to specific places. Compare:
- Here's the milkman - he's come at last.
- The milkman is here - at the door: shall I get two pints?
- There's the book I want - I've been looking for it all week.
- The book is there - by the typewriter.
Addition prompted by user JK2's comment
H̲e̲r̲e̲’̲s̲/̲T̲h̲e̲r̲e̲’̲s̲ ̲m̲e̲, when I was six. (1)
I am here, (that's) when I was six. (2)
In this form of the sentence ((2), SVA), "am" is lacking in what is called communicative dynamism, because it can be used merely as a factual assertion that aims at providing the information plainly as a missing piece of information or as new information, and, no doubt, in a situation where people are browsing through a photo album, or examining a group picture, this is a form that will occasionally have its use; nevertheless, for the same purpose you can use "Here is me, when I was six.", but it is then rather necessary to stress "here", otherwise the communication (if, instead, "me" is stressed) would tend to be interpreted differently by the interlocutor; it is now interpreted by the interlocutor as new information provided with a signal that suggests a particular interest (communicative dynamism). The form considered in the OP is in most cases used that way (stressed "me").
But your excerpt from CoGEL doesn't directly address OP's construction. And I think it's possible CoGEL does address this particular construction somewhere else.
I can find in CoGEL no article more to the point than the article I used above (after a new perusal of the sections concerning this adverb, and after having given more thought to the question); the crux of the matter lies in recognizing that there is an inversion, that is, that the OP's form results from an inversion aiming at making of a plain communication something else, something more (let's say, for simplicity) stimulating.
A clue helping in seeing that an inversion is at the root of this construction may be the difference underlined in the following.
- Here's my partner, let me introduce him to you.
This person, the partner, just appeared, but is not in the immediate vicinity of the interlocutors; then the locutor is in right to say as an alternative "My partner is here, let me …", and then he might fetch this person. Let's suppose now that this partner, being in presence of the interlocutors is being identified as such by them through the double agency of a deictic situation (as a most simple case, locutor and partner stand side by side) and the statement that has just been uttered; then the speaker is not really justified in using the normal order which makes for a plain statement of facts ("My partner is here, let me …").
The reality of an impossible inversion, here, shows that the adverbial nature of "here" is lost and that in fact we are dealing with a presentative, in other word an idiomatic turn.
The fact that "am" becomes "is" and that "I" becomes "me" in the process is certainly puzzling, but "I" becomes "me" in English when the pronoun is in complement territory; this is not according to strict grammatical principles but it's become a standard; as to "am" becoming "is", that seems to be just another case of a common phenomenon of person change (of which I will now list examples).
In colloquial style "here's" is often used with plurals (PEU, Michael Swan)
- Here's your keys. (presentative, no adverb)
- Here's your nice , sweet cakes ! Two for a penny . Here's your cakes , sweet cakes ! (All Aboard! A History of Railroads in Michigan -- Willis Frederick Dunbar · 1966 ·) (adverb, "Your cakes are here")
- Here is your father saying Don't cry , haneyay , why are you crying ? Here is you saying I am so worried for Jacques Cousteau (Teeth - Aracelis Girmay · 2007) (In this very work by Girmay you can also find "Here are your tears […]". Note that "here is" is not to be taken literally; in this case it is a fixed phrase meaning something like "picture < someone > as"; writing "Your father is here, saying …" and "You are here, saying …" is not even an approximation to what is meant. Nevertheless, "are" becomes "is".)
"Here" as an adverb could be the subject of the sentence in just two cases according to CoGEL.
CoGEL § 10.15 Adverbial forms as subject
The subject is normally realized by a noun phrase or a nominal clause. In certain restricted contexts (all informal) prepositional phrases, adverbs, and adverbial clauses -all of which normally realize the adverbial element in the clause - function as subject. Two conditions allow this use of adverbials:
(i) the adverbial is a fragment of an understood clause, or
(ii) the sentence can be related to one with prop it:
- Slowly is exactly how he speaks. ['Speaking slowly is exactly how . . .'l
- Out on the lake will be splendid. ['A trip out on the lake will be splendid']
- Whenever you are ready will be fine. ['It will be fine whenever.. .';
- cf: Sunday will be fine]
- Will after the show be soon enough?
- Because Sally wants to leave doesn't mean that we have to.
In "Here's me ", the adverbial does not seem to be a fragment of any possible clause.