While the fairly basic psychological motivations of Bruce Wayne, Harvey Dent, and, of course, the Joker, have been hashed and rehashed over the last several years, one of the Nolanverse Batman characters remains unanalyzed, and that's Rachel Dawes. Relegated only to her usefulness to the plot or the level of romantic interest male characters have for her, Rachel Dawes might have many positive traits but often comes across as a little one-dimensional, even at her deepest. While one-dimensionality is an issue many characters in Batman films have suffered from, Rachel's problem is compounded by the fact that she was created specifically for the movies and didn't have a deeper comic book background to reference.
Rachel is said to have been created as an amalgamation of a few characters, but that is easy enough to say since most of Batman's movie girlfriends are more or less completely interchangeable (with the exception of Catwoman, who has always stood out on her own). Chase Meridian, Vicki Vale, and Rachel Dawes are all career-oriented women with a strange focus on vigilantism, and their appearances in the Batverse tend to involve stretching their job titles in a way that makes them relevant to Batman. In Rachel's case, despite starting out as Bruce Wayne's childhood friend, she goes on to become the Assistant District Attorney, and she and Batman are forced to work with one another.
In Batman Begins, Rachel was portrayed by Katie Holmes, who had made her mark in public consciousness through Dawson's Creek and a few movie roles. Holmes departed the franchise and was succeeded by Maggie Gyllenhaal in The Dark Knight. Over the course of the first two films, Rachel requires constant rescuing from Batman, who is often vicariously the person endangering her, until, ultimately, she is killed by the Joker. She receives a mere posthumous mention in The Dark Knight Rises, which seems to reiterate the reality that in life and in death, she serves only two roles: love interest and victim.
Still, there is something to be said for Rachel's character trajectory. When she took the role over from Holmes, Gyllenhaal was reportedly pleased by Rachel's decisiveness and her moral compass, having made an entire career out of playing conflicted, uncertain female characters. Rachel does stand out among other love interests in the Batman films in that she is dedicated to her work above her interest in the Caped Crusader, while characters like Vicki Vale were completely distracted by him in a way that became detrimental to their careers. Besides, Rachel doesn't take any guff from Bruce or Batman, and isn't afraid to tell him why he's acting like an amoral, spoiled child on a regular basis. This is why she's a good character; however, she's not a great love interest for him, and it is in trying to force her into that role that the films go wrong in their portrayal of her.
Essentially, Rachel is a character that would be a lot more interesting if she didn't date Batman. In seeking out a love interest for Batman or Bruce Wayne, there was no real reason to introduce Rachel Dawes over Catwoman, Nocturna, Silver St. Cloud, or any number of other characters that had established continuity and fanbases in the comics. Even Batman Forever's Chase Meridian, whose one-liners are shaky at best, is still more interesting than Rachel. One might make the argument that this was an attempt to start over fresh with the franchise, but that certainly didn't apply to any other element of the films, from Alfred to Gordon to the rogues' gallery of Batman villains. Besides, Bruce Wayne's origin story is in no way helped or enhanced by Rachel's presence.
There is an insistence from Bruce, and thus the filmmakers, that Rachel is the only one that understands him, but there is no evidence of that. If anything, Alfred perceives Bruce and his compulsions on a much deeper level. Rachel doesn't seem able to fathom him at all, despite being a deeply empathetic person and making the attempt several times. Again and again, she tells him that what he's doing is wrong. She's right, and he needs to be told that he's in the wrong, but she doesn't do so out of some deep understanding of Bruce or of Batman. She demonstrates her bafflement towards his decisions consistently in the films. If anything, she sees very clearly the things she doesn't like about him and tells him so, which does set her apart from Batman's other girlfriends but doesn't bode well for their relationship overall. It's not because Bruce can't take the criticism, but because she can't take his dark side.
As for her own character, Rachel isn't just a Mary Sue; she's a Mary Sue whose importance is defined through her male relationships and who ultimately gets fridged. In essence, Rachel reads like a checklist of bad tropes, including the one where she's depicted as being much less likable right before she's murdered post-breakup with the hero. That said, breaking up with Bruce Wayne is definitely Rachel's best move throughout either film (with the exception of trying to tase the Scarecrow in the face in Batman Begins).
A lot of people have questioned why Rachel would choose Harvey Dent over Bruce Wayne, but it's pretty obvious. Even without the misunderstanding of Dent taking the fall by coming out as Batman, Bruce is incredibly needy, using Rachel as a moral compass (which is absolutely not her job) and constantly failing to acknowledge her as her own person. There are huge differences in not just their backgrounds but in how they approach things like morality, philosophy, and work. Their sole bond most of the time seems to be Bruce's insistence that there is one.
Despite being childhood friends, Rachel's mother was a domestic worker for the Wayne family, so the power dynamic is intrinsically off. Although not addressed in the films in a consequential way, Bruce grew up significantly more privileged than Rachel. While he was wandering around aimlessly overseas and agonizing over his trauma, she was putting herself through law school. While his commitment later increased as he found his way, hers was there, necessarily, from day one. If not, she'd have been as lost as the people she was trying to save. The fact that she had to work and struggle while his main conflict for several years of his life was whether or not to murder someone in cold blood immediately placed them in completely different worlds. Her dedication to law and structure might be something that he admired, but it was a world he could never have fit into, regardless of if he was Batman or if he wasn't. Even just the ending of the third film, in which him giving up his role as Batman is some strange “yes, I can too stop being Batman” act of petulance directed at a very deceased Rachel, he still never really views her as a person and doesn't truly understand what exactly it was about him that she didn't want to spend a lifetime with. It wasn't Batman; it was his compulsion. It was his stubbornness. It was his inability to be her true partner.
Bruce's great comfort in Rachel's death isn't that Gotham was saved, which is what she wanted more than absolutely anything else in her life. Rather, it's his obviously unrealistic notion that she would have just stuck it out waiting for him to stop being Batman, and that says so much about their relationship. He never really saw her. Unfortunately, due to poor characterization and early death, neither did we. Yet even without being able to fully dive into who Rachel really was as a person, one thing is obvious: she believed in law and order more than anything else, and she was willing to put it all on the line for justice. In the end, while everyone else in the movies was unstable and not always moral, Rachel, who openly demanded everyone operate above board, really might have been the true hero of The Dark Knight.