"Near" has many meanings and can be used as an Adjective, adverb, preposition or verb. "Nearly" is used as an adverb only which means almost.
If you want to compare the two as adverbs,
Near (Adverb) means :
1. close; to a point or place not far away: Come near so I won't have to shout.
2. at, within, or to a short distance.
3. close in time: The New Year draws near.
4. close in relation; closely with respect to connection, similarity, intimacy, etc. (often used in combination): a near-standing position.
5. all but; almost; nearly: a period of near 30 years.
Nearly means :
1. all but; almost: nearly dead with cold.
2. with close approximation: a nearly perfect likeness.
3. with close agreement or resemblance: a plan nearly like our own.
4. with close kinship, interest, or connection; intimately: nearly associated in business; two women nearly related.
****************************************************************************************************
"Nearly" gives us more information about HOW the verb has taken place (Nearly Dead, nearly perfect, nearly like our own). "near" gives us information in addition to how the action has taken place, i.e. not ABOUT the verb (Come near, Draws near) - Here, near does not tell us more about the ACT of coming or drawing but gives us information in addition to it.
"The other subjects were not nearly challenging or interesting for me." - In this sentence, Nearly gives us more information about how challenging or how interesting the other subjects are. So we need to use near.
See this link for more information :
http://www.beedictionary.com/common-errors/near_vs_nearly