Though sort of a pompous fellow, Ernie’s heart and loyalties are in the right place. Harry first met him in his second year, when Ernie took the lead among the Hufflepuffs in attempting to protect Muggle-born Justin Finch-Fletchley. Although at first he believed Harry to be the Heir of Slytherin, Ernie saw reason when Hermione was Petrified, and gave Harry a public apology, which was accepted (CS).
Ernie became a prefect in his fifth year, together with his close friend Hannah Abbott (OP10). At the beginning of that year, when the Daily Prophet‘s smear campaign was at its height and Umbridge was torturing Harry in nightly detentions, Ernie spoke up very loudly and publicly in support of Harry and Dumbledore in front of a grateful Harry (OP13). Ernie later suited action to words and joined Dumbledore’s Army(OP16), even joining the group that cursed Malfoy on the Hogwarts Express at the end of the year (OP38). He later fought in the Battle of Hogwarts, leading the crowd that wanted to stay at school and fight (DH31) and helping save Harry’s life with a Patronus (Ernie’s was probably the boar) (DH32).
Ernie was always one of the most studious Hufflepuffs. He was the only Hufflepuff in Harry’s N.E.W.T.-level Potions class, implying that he got an O on the Potions O.W.L. (HBP9) This is due to Ernie studying eight hours a day for his O.W.L.s (OP31), a habit he frequently pointed out as he interrogated his classmates about their study habits.
Ernie's family is pureblood for at least nine generations (CS11)
"Earnest" = English for "serious;" also used to refer to something put up as a pledge of one's faith, such as 'earnest money.'