Dudley is a Fat Bastard, very much a Spoiled Brat whose parents spoil him even more. Dumbledore points out that his spoiled attitude is purely caused by the way said parents treated him, and pities the way he's been traumatised as well as raised into believing that he is entitled to treat others badly. Also, despite bullying Harry for their entire childhood, after he gets attacks by dementors, he's forced to see himself for how he really is. He reforms and tries to make it up to his cousin, and the two continue to visit each other as adults.
Draco is classist, spoiled, egotistical, and a supporter of Fantastic Racism, not to mention an extreme coward. However, once again, many argue that it's simply caused by indoctrination and his upbringing. When he joins the Death Eaters to kill Dumbledore, he suffers a mental break-down at the first-row sight of what the Death Eaters will do, the knowledge that he's not talented enough, and Voldemort's threat of killing his parents if he fails. Even though he never supports Harry, in the final battle, he stops fighting for the Dark Lord.
And Snape, maybe the champion of this trope in the Harry Potter universe. He is cruel and rude, bullies and torments not only Harry, but plenty of other characters (specially Neville, whom he mentally tortured to the point that Snape took the form of the biggest representation of his fears in life), and has threatened animal abuse (though, to be fair, this seems fairly common in the wizarding world). However, his parents weren't exactly the best (it's all but stated that Tobias was abusive, while Eileen was neglectful) and he lived a lonely childhood where his only friend was Lily Evans, who he grew to love. At school, he was bullied by his rival James Potter and his friends, and at some point, a very stupid trick by Sirius nearly led to him being killed, with only James's timely intervention saving him. He joined the Death Eaters, thus commiting the grave mistake of embracing Fantastic Racism. However, one day, he pressed Lily's Berserk Button to the core, via calling her "mudblood"; she was so rightly upset after having been patient with him for years that she cut off all ties to him, and as he refused to leave the Dark Arts behind, he lost her friendship forever, and thus he watched her get married to the man who had bullied him for years -- because James learned his lesson and grew into a decent guy (offscreen). His working for Lord Voldemort directly led to her death...and having seen how his actions had cost him his only friend, he spent the rest of his life grieving for her and protecting her son, who happened to look just like James, and whom he still horribly and very undeservedly abused -- only to discover that he was going to have to die in the end, eventually. He had to live for years as a spy, bitter and alone, forced to kill the one man he respected and cared for, and then was murdered himself. Does it make up for everything he did? Leave it to yourself to decide.
Greg from Diary of a Wimpy Kid. Greg is lazy, self-centered and a mild example of a Ted Baxter...but he suffers from Middle Child Syndrome, gets picked on by bullies at school and Rodrick at home, and Rowley's parents consider him to be a bad influence on their son. It's really easy to see why he's prone to Jerkass moments.
Erik, The Phantom of the Opera. Mad Artist, unrepentant murderer, Stalker with a Crush extraordinaire...yet almost everyone gets just a little misty-eyed over what happens to him at the end. Gaston Leroux even points out that being born with an absolutely brilliant mind and a deformity which prevented him from using it in any constructive manner was a pretty raw deal for "poor, unhappy Erik".
Arguably, Ebenezer Scrooge of A Christmas Carol is one of these. He's initially seen as a gruff, penny-pinching old man who doesn't care about people, content to live alone in the truest sense of the word. However, as we see his past, we come to understand that his father hated him when his mother died giving birth to him, and stuffed him in a boarding school, not even bringing him home when school was out of session. He watched the other children go home to their families as he stayed there alone. The only one who truly ever loved him was his sister, Fan. Without learning how to put love before reason, he continually put off his marriage to the woman he loved until he could amass enough wealth to ensure that they would be financially safe. She leaves him. Also, Fan dies. To make matters worse, all of these tragedies had strong ties to Christmas, often happening on Christmas or Christmas Eve, justifying his disdain for that time of the year. Needless to say, all of this causes him to become a bitter man - the one we see at the opening of the story. Scrooge even gets to see his fiancée with her husband and children, seeing what he lost when he didn't fight to keep her.
L.A. Confidential: Bud White is, well, a thug with all the strength and self-control of a rabid rhino. But his backstory is nothing short of heartbreaking and he gets surprisingly many genuinely touching scenes.
Elphaba in the novel Wicked. From her conception onwards, her life's been one big Trauma Conga Line. Her mom was a drugged up mess who dropped her knickers for just about anyone. Her legal father was a religious nut, and lavished affection on Nesaarose, who grew up to be even crazier and more dangerous. Sure, she gets something of a break when she heads to Shiz, but Glinda's more absorbed with social climbing than anything. Sure, there's Fieryo, but he's no prize - pretty much using her for sex while neglecting his wife and kids. Oz itself is a Crapsack World tearing itself to bits over religious fervor and political unrest, the Wizard is a Magnificent Bastard by any definition, and the Animals make lovely targets for every side to vent their frustrations on. Elphaba chooses to side with the Animals, as she knows all too well what a raw deal they're getting. Yet, she ends up completely alone. What allies don't stab her in the back to save their butts end up dead. By the third act, she is completely around the bend nuts. She knows that Dorothy is a political pawn in the Wizard's scheme and has zero clues about what's really going on. She's convinced that the Scarecrow is her dead lover reincarnated (the musical plays this straight). She still sends out her armies of Crows, Wolves, and Bees to destroy them, and still tries to bully a clueless farmgirl over a pair of enchanted shoes that she knows might not even work...by the time the water hits her, it's almost a relief.
Pretty much every single character in A Song of Ice and Fire, save for a handful of Complete Monsters. The author has a brutal tendency to spend anywhere from a chapter to a book showing you what a vain and selfish bastard everybody but the currently-narrating character is, only to switch the narration to one of the abovementioned bastard's perspectives and suddenly make you want to punch yourself in the balls for having ever been so unempathic to such a tragically real human being, but they should probably still get over it already before their confused pride kills everyone.
Gollum is a vengeful, Ax Crazy creature who's done more than his fair share of awful things both under and independent of the Ring's influence, but ultimately, he's presented as a broken, pitiable figure rather than an object of hate or fear.
Oddly enough, the orcs and even the ringwraiths have occasional moments of pity given them. Or as Gandalf says, "I pity even his slaves..."
The fat kid from American Gods is an arrogant prick to anyone who doesn't think that he's the way to the future, but in the middle of nowhere, no reception, and nobody to talk to, he breaks down completely. Later, it's revealed that he's being manipulated by Mr World, who considers him utterly expendable.
Rodion Romanovich Raskolnikov, protagonist of Dostoevsky'sCrime and Punishment. He's malnourished and lives in squallor -- but mostly because of his sense of self-aggrandizement, because he won't "lower himself" to getting a job. He spends most of the novel bedridden with a fever--brought on by his guilt over the double-murder he commits in Part 1 and his anxiety over getting caught, and which he keeps exacerbating by getting up and wandering through the streets of Petersbug. His best friend, his sister, and his mother all try to help and support him, but he petulantly tells them to get lost and leave him alone. He even sadistically taunts the Hooker with a Heart of Gold, even after she follows him to Siberia to support and be near him after he confesses to the murders.
Vera from V. C. Andrews' My Sweet Audrina. She's a Manipulative Bitch who constantly belittles and schemes against her half-sister Audrina, tries to steal Audrina's boyfriend/husband away from her (when she's not chasing after other guys, that is), and crosses the Moral Event Horizon at least twice by being heavily implied to be the one who pushed Audrina down the stairs, nearly killing her, and being revealed to be the one who set up Audrina to be raped by a pack of boys while walking home from school on her birthday, which so horribly traumatized Audrina that her father had to deliberately invoke Trauma-Induced Amnesia for her to even be remotely happy again. And yet, the heavy implications that her being like this is mainly due to her adoptive father constantly ignoring her in favor of his daughter Audrina and even spanking her when she desperately tried everything she could think of to gain his love, plus her being VERY prone to injury, garners her enough Woobie points for the audience, along with Audrina herself, to constantly swing between hating her and feeling sorry for her.
Mayella Ewell from To Kill a Mockingbird. She willfully accuses a black man of raping her. She knows damn well that this could easily lead to his imprisonment and execution. She is not sorry. And yet --! She harbored an unrequited crush on Tom Robinson, the only man who was ever nice to her, and amidst being Promoted to Parent around her uncontrollable siblings, she tried to keep a patch of flowers alive in her sad little yard. And it's implied that her father sexually abuses her -- no wonder she acts out.
Anne Rice's Vampire Chronicles has some of these. Lestat De Lioncourt is definately one of these. I mean, he's not called the Brat Prince for nothing,. The guy started off as the youngest son of a broke aristocratic family (how the hell does that happen), his mother was sickly and dying (prior to become a vampire), his older brothers and father pretty much hated him for wanting to be a free spirit, he was kidnapped by Magnus to be turned into a vampire, only to be abandoned by his maker (granted, he did get a large fortune of treasure), and almost all pf his fledglings abandon him. But then again, the one women he loved ended up with stigmata (she was a nun) and he was a pawn for a meglomaniac wannabe goddess, and, to top it all off, even when he isn't being a jerk ass, his fledlings still look down on him, but then again, he is reckless as hell
Davy Prentiss, Jr. in The Ask and the Answer. He starts off as a total asshole to Todd, but eventually, right before Mayor Prentiss shoots him, shows Todd in his Noise that he thought of them as brothers. He also comes right out and says that Todd is his best friend.
Percy Jackson and The Olympians: Clarisse LaRue has this trope going for her. Granted, she's a bully and is very nasty, but being Ares' favorite daughter isn't easy, especially when you are clearly scared to death of your dad.
Inquisitor Sand dan Glokta of The First Law. Once a famous soldier, now a crippled loner who tortures people for a living. Still an incredibly sympathetic character; the reader sees a lot of his bitterness and self-loathing as the novels go on.
Novinha from the Ender series, so, so much. When she was orphaned as a child, her parents were celebrated as martyrs, but she just missed her mom and dad. This drove a wedge between her and the community. She learned to love again as Pipo and Libo became like family to her, but after Pipo died, she became more of a mess than ever before. During her life, she suffers abuse and the loss of many loved ones. She also hides important information from people in a misguided attempt to protect them, chooses to marry someone she doesn't love, cheats on him, neglects her children, blames people for things beyond their control, and in other ways behaves as if she's trying to drive away the very people she's afraid of losing.
Marcao, posthumously, from the same book. He's an abusive drunk whose kids literally prayed for him to die and were pleased when he did. Then, at his Speaking, Ender describes how the community bullied and rejected him as a child, so that the closest thing he had to a friend was Novinha, who couldn't stand him, and reveals that he knew about Novinha's cheating and took every new child (all biologically Libo's, Marcao was infertile) as proof that she still didn't think he was good enough for her. You feel really bad for him until you remember the obvious fear and hatred with which his kids viewed him.
Brukeval from Jean Auel's Earth's Children - a hybrid of Cro-Magnon and Neandertal who hates himself and the Neanders because of the way his looks have gotten him treated, and both loves and hates Ayla.
Arguably, Thero from Lynn Flewelling's Nightrunner, who is an unbelievably power obsessed prick of a wizard apprentice in the beginning, always snickering about his rival Seregil's bad luck when it comes to magic. Plus, he probably has a stick in his arse. And he has an affair with his master's mistress. And then you gradually notice that a good deal of this Jerkass attitude is to cover his inferior complex to Seregil, who was a former (unsuccessfull) appentice of his own master, Nysander, who still loves Seregil like a son. Thero himself wants this kind of attention and kindness from Nysander (although Nysander remarks that he probably wouldn't know what to do with it) and covers his frustration up with arrogance. Not to mention, Seregil often enough provokes him. And then we start seeing Thero as a Jerkass With a Heart of Gold...and then Stalking Darkness kicked in. You can't help but pitying the guy.
Coraline Jones in Coraline, also see the movie folder.
Blanche Dubois in A Streetcar Named Desire. She's very harsh towards Stanley (who she sees as a 'Polack' and an 'ape'), and she isn't particularly nice in general, but once you find out about her past, it's very hard not to feel sorry for her...Not to mention, she's raped by her sister's husband and, in the original play, her sister doesn't do a thing about it after the rape, like, say, leave Stanley or confront Stanley about the rape. Or the fact that she ends up becoming flat out insane and sent to a mental institution.
Merrin Meredith from Septimus Heap. After having been nurtured and mistreated in his entire youth by DomDaniel, you'd hardly expect him to be a nice person in most of the books.
The gods in the Books of Swords are quite possibly the ne plus ultra of Jerkass Gods, but you can't help but feel at least a little bit bad for them at the end, when they are dying.
In The Perks of Being a WallflowerCharlie's aunt was raped as a young girl, which led to her having serious psychological issues, which is why she herself molested Charlie.
Reed Brennan from the Private books. Reed constantly criticizes everyone at her school for being ruthless and ambitious, but she herself acts the same way, even taking delight in hurting people she doesn't like. However, she's been stalked, harrassed, and near-murdered by more than a few people. Not to mention she comes from a dysfunctional family, she's one of the few scholarship students at her school, she is very well literally cursed (thus bringing bad luck to everyone else), and is the product of an affair her mother had with her best friend's father.
Tien in Vorkosigan Saga. He was incredibly insensitive to his wife Ekatrin. But he was himself burdened by genetic flaws and the Barrayaran prejudice that went with it.
By the end, Marik of Gundar, even in-story. Lanen hates him but doesn't think he deserved to be stabbed, kept on the painful edge of death until he consented to Sharing a Body with the Demonlord, and then absorbed into its molten stone body. Though once that had finished he seemed less distressed.