the entirety of the show takes place in school and it deals with the unpopular male mc being in love with the popular girl female lead. Maybe there's a love triangle between him, the female lead, and a popular guy. The unpopular guy and popular girl end up together in the end.

I see so many male characters being the popular school student and usually female lead is dowdy and poor. You might like the film Our Times, male lead is more of a thug but his reputation is well known. Female lead is not popular though, she's geeky and gets a makeover further in.

There is also historical school setting, SungKyunKwan Scandal which is awesome romcom. gender bender with female lead in disguise as a guy, she becomes slightly popular/well known while male lead is not very popular. There is also a forced living situation, and an almost love triangle. 
Yeah, you see the "unpopular guy/popular girl" much more in anime/manga. In these live dramas, it's usually the other way around. I've seen like 1 or 2 where it's a rich girl/not rich guy, but usually that when they are adults. Well if you come across anything, let me know.
campus confidential = taiwanese film 
male lead is geeky and unpopular and the girl is popular
takes place at a college 
(warning : expect a twist) some people like a surprise some people dont but if you do then i suggest you try it :) 
this was probably the only drama or film that i could think of that met the criteria cuz like you mentioned before, everything is unpopular girl likes popular guy
saw Orange Marmalade so long ago i dont remember well but i think it fits? most school romance deal with unpopular girl and popular guy 
I don't know a drama with unpopular boy/ papular girl relationship,
but for the opposite (popular boy - unpopular girl) here are some (Japanese/Chinese) dramas:
Good Morning Call
Love in Tokyo
Master Devil Don't Kiss Me
Operation Love (though here. they are BOTH popular)
Best Get Going(though it's about interns and post college life)
Suddenly Seventeen

For more "serious"/Melodrama dramas:
Back In Time
Fifteen years to wait for migratory birds

For coming soon dramas:
Rush to the Dead Summer
@soojungstrash - No, he was popular and she wasn't because of her being a vampire.
We have a hard time to find something like that in dramaland. Particularly korean. But you can check for

Adolescene Medley (Special): this is closest what you looking for
one day (Thai movie and its not school): the guy is a mere, and girl quite popular
Bring Itu On, Ghost!: Campus setting
hello schoolgirl
My Rainy days
positive phisyque
minami-kun No koibiito season 3

believe me, we've same concern about this XD
I'd assume that it would be less likely in a Japanese drama.
Prison School

and maybe Koe Koi ? 

shounen manga often use unpopular boy likes popular girl while shoujo manga use unpopular girl likes popular boy arc. So if you want try to look into shounen manga adaptations. 

Koe koi? I'm bit skeptical since i look tone at the poster like something shoujo-ish
Koe Koi is shoujo-ish but the two male characters have eccentricities that can make them really unpopular in real life high schools but it's a slice of life so no big conflicts.
I've seen Koe Koi, it was pretty good.
Not sure if you've seen Who Are You: School 2015  but it has a lot (not all) of the elements you describe actually.  There is a twist to it because there are twin female leads, so to speak.  Anyway, I don't want to spoil how it ends up.  The acting by SungJae, the unpopular guy, was really amazing. His role makes the show worth watching or rewatching.   I've got my eye on him as a rising star.   http://mydramalist.com/13386-who-are-you-school-2015