Who are these ghostly figures in the Route B ending?

Solution 1:

the girls identity is revealed in Route C, so everything bellow this would be spoilers for Route C


The girls are called N2, the Network AI of the Tower that appears after the Bunker's destruction and also the Network AI of the Machine Lifeforms, revealed in Jackass's report that's unlocked after Ending C

to sum up the link, because Humanity went extinct after the events of Nier with the failure of Project Gestalt (the reason why Devola and Popola are treated so badly is because of the failure of another pair of Devola and Popola in it) and the Machines killed off the aliens the Machines, still programmed to defeat the enemy, realized they couldn't truly destroy the Androids otherwise they have no enemy to defeat.

this lead them to create Project YoRHa (the reason why Black Boxes are made from Machine Cores) and the Council of Humanity and as apart of this endless war there was a back door installed in to the Bunkers that would allow the Machine Lifeforms to access them. at the same time the network intentionally created faults within it allowing for evolutionary growth resulting in Machines like Pascal and the Forrest King being born

The Network entered into a continuous state of repair taking in surrounding until it reached a fixed state. such data also included the server that stored information on humans, Project Gestalt and of Yonah (if i recall, was the first successful example of the Gestalt process) and from this the network changed, developing the ego called N2.

as per Jackass's words: "we've been fighting a network of machines with the ghost of humanity at its core. We've been living in a stupid *****ing world where we fight an endless war that we COULDN'T POSSIBLY LOSE"