In addition to the popular right test that WavesWashSands refers to, evidence showing that here is a preposition - and not an adverb - comes from the fact that it can postmodify nouns (cf. The people here do not like changes), whereas real adverbs cannot. If, on the other hand, here were of some other category, say an adjective or a noun, it should be able to premodify other nouns, but, of course, it is not (cf. * The here resources are insufficient). Since a V, a Det, a Q, a Deg, etc., it cannot be either, analysing it as an intransitive preposition is virtually inevitable.
Here cannot by itself in general be analysed as a phrasal category (= PP), though, because it can be accompanied by its own dependents - not only right, but also PP's, as in Here in London, housing is terribly expensive __.
The fact that, in such an example, Here in London can be 'extracted' ( ?topicalized) as a whole from its VP/AP, but in London on its own cannot (cf. * In London, housing is terribly expensive here__) constitutes further evidence that 1) here in London is a unitary constituent, and 2) that both here in London and in London are PP's, because, otherwise, the extraction of the PP complement in London would not violate Ross's 'A over A constraint' (or: 'minimality', under later approaches to movement) and should be grammatical (as are other PP complements extracted from non-PP's above them), but of course it is not - which follows nicely from the 'A-over-A constraint'.
Then, obviously, if here in London is a PP, here must itself be a P, because it is the head of that phrase, as shown, and phrases are endocentric, according to the X-Bar principles. That is a desirable outcome, because, if here is the head of the PP here in London, its non-extractability from it (cf. * Here, housing is terribly expensive __ in London) needs no explanation, as heads of PPs (contrary to those of, e.g., VP's or AuxP's) can never be extracted, cf. * In, I have never felt at home _ Berlin.
That, by itself, is fairly strong evidence, I think, that here is, indeed, the head of the PP here in Berlin and, according to the endocentricity principle, a preposition, a conclusion that reinforces the evidence already presented in paragraph 1.
[The only other alternative (i.e., that the head of here in London were the preposition in, with London - its 'internal' argument - in its complement position, and here somewhere else, either as an adjunct or as a specifier) would not change things much, as we know from the arguments above that here cannot be adverbial, adjectival, nominal, etc., and must be prepositional anyway, but, apart from that, that possibility can be safely discarded for different reasons: PP adjuncts like here in London are 'predicates' whose 'external' argument must be 'discharged' by the 'e(vent)' variable associated with the VP/V' they modify, and, therefore, they cannot project their second argument in their specifier position, because, if they did, they would become 'saturated' and would no longer be able to 'take' the 'e(vent)' argument associated with the 'VP' they must modify. The specifier slot of such PP adjuncts, therefore, must be empty, which excludes here from that hypothetical position. Hence, if the head of the PP here in London were the preposition in, here could at best be an 'adjunct' of in (one under the scope of right, cf. right here in London vs. * here right in London), but, if so, it would also have to be a phrasal category, i.e., a PP. PP pre-modifiers, however, are severely restricted in distribution; short of in (semi)-lexicalized expressions such as an out-of-print book), they practically never occur, and, in particular, locative PP's seem impossible to construe as modifiers of other locative P's like in London; in all the examples I can think of, the analysis must be different, in terms of two independent locative PP's].
In sum: there is rather solid evidence, I believe, in support of the claim that here is, categorially speaking, an intransitive preposition, and a 'head', although, of course, it will also function as a phrasal category whenever it occurs on its own (i.e., without the ?adjunct right or complements like in London). [I deliberately leave aside here the question whether here should also be analysed as a P, instead of a 'nominal' (a DP) in postpositional expressions like hereafter, etc.