How to handle such a large class imbalance in text data?
For the most part, as you add more classes to your multiclass classification problem, it becomes more difficult to construct a model. All algorithms can run into trouble because there are fewer examples of each class to learn from. In case the 27 class target feature does not work well for you, you can decrease the number of classes even more. To do this:


Continue what you already did by grouping small classes into the "other" category. Perhaps a model with 2 or 3 classes would be useful for you.
Try a semi-supervised learning approach. Try clustering of your different categories and group similar categories into the same cluster. Your model will now predict cluster A, cluster B, etc.