What is a suitable loss function and evaluation metric for a classification model with large number of unbalanced target classes?
You could look at sensitivity and specificity. They can be combined effectively to either provide a basis for a correct classification, or the basis for an exclusionary classification within each class.  That said, if you are looking for a measure for the model as a whole, you'll probably want to look at some sort of weighted average of the sensitivity scores. 

sensitivity is the same calculation as precision, but specificity is not the same as recall.

That said, you may need to have several models that specialize in different areas or, perhaps as worst case scenario, you may need to produce a one-vs-the-rest ensemble of models to get the best results. This might help if, as anymous.asker suggested, perhaps you can introduce some cost around positive or negative outcomes.

HTH