PM 8/9/1999 EDT, you wrote:
How and why does Valjean identify with Fantine?
Fantine once worked in Jean Valjean's factory. He fired her at his foreman's urging - not realizing that the reason his foreman gave was false. So Fantine becomes a prostitute to support her child.
When Fantine dies Jean Valjean feels he owes her a moral debt to support her daughter Cosette. He rescues Cosette from the innkeeper Thenardier who has enslaved her as a servant in his inn and treats her brutally.
Jean Valjean (who has escaped from prison himself) pays Thenardier and takes Cosette to Paris and raises her there.