TITLE: Pros and cons of specializing in an esoteric research area
QUESTION [31 upvotes]: If a mathematician specializes in a popular research area, then there are many job positions available, but at the same time, many competitors who are willing to get such job positions. For an esoteric research area, there are few competitors and job positions. There are very often pros and cons of such research areas.
What are some pros and cons of specializing in esoteric research areas that many people may not know?
Maybe it is a little hard to answer this question in full generality since circumstances vary. Hence, I especially want to listen to examples, personal experiences, and maybe urban legends.
Now, if you are interested, let me tell my personal circumstance to give some context to this question. I am a student from outside of North America who just graduated from my undergraduate institution. Since I decided to study abroad, I applied to several North American universities last December and was admitted to some of them. Now I am wavering between two universities. Denote those universities X and Y. 
Among the specific research areas available at X (resp. Y), I am interested in two of them, say, A and B (resp. C and D). 
I did some searching in those research areas, and I found out that there are many people who are researching C and D and some of them are in my country. However, there are only a few people interested in A and B and none of them are in my country. Based on my search, I think (with a little exaggeration) there are about 3 universities in the world where a graduate student can specialize in A. B is not as esoteric as A, but still, it seems there are not many people working on B. However, I think C and D are quite major research areas in my field of study. 
[In this question, I used 'field of areas' as something in First-level areas of Mathematics Subject Classification and 'specific research areas' as something in Second or Third-level areas of it. ]
At first glance, I prefer X over Y, because I was very interested in A. Also, this is partially (maybe totally) because X is considered more `prestigious’ than Y. However, I’m a little nervous about specializing in esoteric areas such as A and B, because of the number of job positions and this kind of problem.
Anyway, I think it is not a bad idea to ask a question at MO and to listen to the pros and cons of specializing in esoteric fields to make a better decision. Any personal stories or examples will be really helpful. Thanks in advance.

REPLY [2 votes]: I think it really depends on your goals. The OP says he's thinking about which grad school to attend. If you're goal is to get a higher degree and then a job in industry, you would be well-advised to do research in something considered "useful." That's not a pre-requisite, and I know a ton of abstract homotopy theorists who now work as data scientists, but it's also fair to say that the transition out of academia is easier if you have some skills you can showcase to companies.
If your goal is to be a professor, I think it's important to realize just how hard it is to get a job these days. The AMS publishes data about the number of PhDs and the number of people who get a tenure track academic position every year. Only about 25% of math phds get a tenure track job. Many of those who get a job in a given year are coming from a postdoc rather than directly out of grad school. When we hire, we get more than 400 applicants for a single job, so even if you do everything right, the competition might still prevent you from getting a tenure track job. Really think about this. A lot of people are jaded when they can't get a job. Don't assume it will be easy or even possible. 
If you want to go to a research university, I think you'd be well advised to pick a less esoteric field, or to connect your research to new and sexy things (e.g., lots of people are getting jobs now in topological data analysis, whereas almost none are getting jobs in chromatic homotopy theory). 
If you are not wedded to the idea of being a professor at a research university, then do not overlook liberal arts colleges. These jobs have a slightly higher teaching load but can still provide a lot of research support, sabbaticals, etc. The essential point for these schools is that teaching is valued more than research, so if you think you might be happy at such a place then it's essential to develop your capabilities as a teacher. Much more important than your area of research is whether or not you can teach statistics or computer science. You get that skill and you will get a job, 100%. You might consider picking up a masters in CS or stats during grad school, as that would help you get a liberal arts job, and would also help if you go to industry. I got a master's degree in CS at the same time that I was getting a PhD in math, and it really did not take a ton of effort. One other point is that liberal arts colleges increasingly want faculty to do research with undergraduate students. Their undergraduate students can be very strong (more like the level of a master's student), but it might be wise to pick a research area that's easier to get into, like graph theory or knot theory, rather than something insanely esoteric. Again, computer science, applied statistics, and data science are very fertile areas for research with undergraduates.