Moriarty was self aware because it was accidentally programmed with knowledge similar to Data. But, it’s core personality was that of a Victorian gentleman villain and sociopath. So it had a conflict of understanding which meant it viewed everything through that lens. The Enterprise itself became somewhat self aware, again through the hilodeck systems, possibly due to the Bynar programming way back when.
The Doctor was a tool that basically gained full awareness through basically being left running so long that his personality grew (and modifications made by Kim and Torres) even though he knew what he ‘was’ to begin with. Kes started him on that path. It’s also possibly related to Voyagers computer being part organic, which was experimental.
Vic was one hundred percent programmed to be self aware, and it’s maybe a side effect of his general personality (which may be programmed, or may, like Data, be a side effect of ‘natural growth’) that he was happy with his position in that knowledge. Basically, ‘Ok, I’m a lightbulb, but I’m a lightbulb who wants for nothing and is having a great time, so what does it matter’.
By definition, all of them are self aware: they know they are holograms running in a simulation. Only Moriarty had to deal with this as any kind of shocking revelation and a moment of ‘becoming’.
The Doctor did have revelation and growth, once he (or his program) thought about it.
Vic, always knew, and was always intended to be as is.
They actually sort of mirror the Soong boys. Only not as intensely.