A lot of it depends on the writer, and the story in question. A majority of Doctor Who stories take place in the Doctor's "recent present", so flashbacks or future visions don't go too far into the past or future of the Doctor's timeline. There's also generally less references to past Doctors in the revived series, most likely due to confusion for viewers. That said, there are definitely points where past Doctors are referenced. In terms of new show, the 11th Doctor's first appearance (The Eleventh Hour) directly shows clips of past Doctors. In the older serials, the Third Doctor's first encounter with the Daleks (Day of the Daleks) resulted in them needing to scan his mind to find out that he is The Doctor that they remembered.
Judging by the reactions of characters who meet a "new" Doctor, most people don't have the ability to recognize the Doctor once he regenerates. However, they'll often "recognize" The Doctor once he introduces himself, and act as old friends, such as the Brigadier, or old enemies, such as the Daleks.
That said, there's a few people who probably do have the ability to know who the Doctor is, without the process of a brain scan or an introduction. These are mostly the "super powerful" aliens, including other Timelords, the White and Black Guardians, and the Eternals. It generally seems that races that are as powerful or more powerful than the Timelords know who the Doctor is even throughout his regenerations.