Your question alludes to the interesting notion that research in pure math is analogous to investing in stocks (or other financial assets), whereby choosing your research area is akin to choosing which stock to invest in. The idea is that a savvy researcher will cleverly choose the research areas with the highest expected "return on investment" to invest their time in: some research areas are supposedly old and dead, with all the exciting results having been discovered a long time ago so that it is difficult to make any meaningful contributions; while other more recently founded areas are so new and exciting that many "golden" results are metaphorically lying in the streets, just waiting to be picked up by anyone walking by without requiring great talent to uncover. Your question reflects your desire to "pick a winner" and achieve greater success than others who are not so careful to optimize their picks of research area.
Now, how accurate is this analogy? Can one really improve one's odds of success in pure math through such strategizing in the same way that this is possible (though far from easy) to do in the stock market? Well, one school of thought would say that the efficient market hypothesis guarantees that the job market for academic math positions, like the stock market, is efficient, with all the other "players" having already made choices that guarantee that any field one enters is as difficult to produce good work in as any other: new and exciting fields will quickly become so crowded and competitive that one might as well find some less trendy niche research area where you can work by yourself and the lack of competition compensates for the decreased fruitfulness of the subject.
I would argue differently however. I think it's obvious to any experienced mathematician that the "math research market" is not an efficient market (neither is the stock market, incidentally, which is why some investors are consistently successful in making more money than everyone else there) and that it is possible to "pick winners". In fact, the ability to pick winners and invest one's time and effort in fruitful research directions is precisely one of the things that separates successful mathematicians from less successful ones; this ability is part of what we call "talent" (the other part of talent is the talent required to actually solve research problems once you have decided which topic to think about, of course).
After this somewhat abstract discussion, let's get back to your question. I don't think it's unreasonable of you to try to optimize your choice of research area for career success -- as I said, all good mathematicians do this -- but your question does reflect a certain naivete regarding the scale at which this optimization takes place. Each of the areas "number theory", "algebra" and "PDE" that you mention represents such a huge part of mathematics that it is meaningless to ask whether the area is a wise one to do one's research in. This makes no more sense than asking "is it unwise for me to do my PhD in math rather than computer science because math is an old field of research?" As others have said, your actual research topic will be much more specialized than "math" or "computer science" or "number theory" or "algebra". Some research subfields of any of these fields are indeed no longer very productive or trendy, while others are thriving (as a small example, in the "old" area of number theory there has been some incredibly exciting progress recently towards the twin prime conjecture thanks to the work of Yitang Zhang and the follow-up Polymath8 project). The way the optimization actually happens is at a much smaller scale: within very particular research subfields, some researchers are consistently good at asking the right questions, or identifying connections between two seemingly unrelated subfields and making a clever choice to invest their time in thinking hard about both subfields to dig deep into that connection.
Another way in which I see your question as being naive is that you are not taking your natural skills and talents into account. Doing successful research in different areas of math requires hugely different skills. Indeed, I think it's quite rare for anyone to simultaneously consider specializing in either algebra or PDEs, since those are very different areas which require different abilities and tendencies (I find the notion that you are entertaining both simultaneously to be rather amusing). What would be unwise is for you to pick a research area without having any feeling that your particular problem solving skills and other talents are in some way adapted to the area you are picking -- some sense that you are drawn to the field, that you have a good intuitive feeling for it, are good at solving problems in it, and -- ideally -- find it especially interesting, are passionate about it, etc.
To summarize, I think the general idea of considering carefully which research subjects you want to work on in order to maximize your chances of success is a sound one; but it's not really helpful to do this according to broad, simplistic measures of old versus new or trendy versus stale. The best approach is to combine getting advice from multiple experienced people with listening to your own voice regarding which areas you are drawn to and think your talents are suited for, and which problems your intuition tells you are exciting and good research directions to go in. Good luck!