Honestly, all of the proposed 'hard' example sentences sound a little odd to me. Both 'study hard at...' and 'study ... hard' are used, just not in exactly that way.
"They are studying hard to pass the TOEFL."
"He is studying hard for finals."
"He is studying hard at biology because he wants to get into a pre-med program after he graduates (high school)."
I think 'study hard at' is used mostly in speech when the speaker has already said 'study hard' and needs to finish the sentence somehow, although I agree that a naked 'study at (subj.)' sounds weird. You can 'study hard at English' but you can't 'study at English', counter-intuitive as that may be.
I've never heard 'he studies hard in (subject)' in my life. I'm not saying it isn't used, but it doesn't appear in the regional (American) dialects I've been exposed to nor in the British or American broadcasts that I watch. I feel that I've heard 'He studies hard in (class name)' or 'He studies hard in (school name)', within certain forms of larger sentences, but I can't easily think of an example sentence where it actually sounds natural.
As a side-note, I don't believe that 'on accident' is regional (at least not in any large region), but I believe it's young people's slang in most American regions. I think it got started on purpose as word-play because the opposite of 'on purpose' would logically be 'on accident'. (It would also be reasonable to suppose the opposite of 'by accident' should be 'by purpose'. And of course, you -can- say 'by design' and 'by intent', so it's a little odd that you can't say 'by purpose', but maybe not odd enough to make for catchy defying-the-rules wordplay the way 'on accident' has done.)
I don't know that I've ever heard anyone use 'study earnestly' or in normal speech, but it's used in writing and narration relatively often. You could hear it in a documentary, e.g., "These students are studying earnestly, knowing that their hopes for the future depend on academic success."
'study in earnest' is even more a written phrase and less likely to be spoken than 'study earnestly'. I think 'study in earnest' is most likely to show up in biographies, e.g., 'After the war, he returned to Princeton and began studying mathematics in earnest.'