The idiom had better is irrelevant here: it governs the verb remember, which must be in the infinitive form without a to marker.
The verb whose form you ask about, HAVE, is employed here as the finite verb heading the that clause ('content' clause) which is remember's complement. Remember does not license a 'subjunctive' form in its complement; the verb which heads the complement clause agrees as usual with its subject in person and number, and is cast in the form which expresses the appropriate tense.
In this case the subject of HAVE is she, a 3d person singular pronoun, so it should take either a present-tense form has or a past-tense form had. Which you use depends on what you mean.
You probably mean that she should remember an obligation to leave in the near future. If this is the case, use has.
She had better remember that she has to leave the city soon.
However, it is possible you wish her to be reminded of a past occasion when it was necessary for her to leave. If this is the case, use had.
It seems that Diane has forgotten why she failed to meet Bill last year. She claims it was because he stood her up; she had better remember that she had to leave the city soon and she stood him up.