What are the 'objective circumstances' that one young researcher should take into account when choosing a research topic? Premise: I originally asked this on MathOverflow, but it was pointed out to me that it could be better fit for Academia Stack Exchange.

Note: I have received extremely varied advice on the following matter by various students slightly older than me, so I post the question here in the hope to get an objective 'technical take' from experienced researchers.

Assuming that there are several topics which are equally attractive to me and that the prospective advisors are all established researchers in their fields and "nice people", are there any objective circumstances that I should take into consideration when searching for a topic for an undergraduate research project 
(clearly, this question naturally generalize to the choice of Ph.D. dissertation topics and general research advice, about which, if you please, you are free to elaborate) to maximize my chances of making an "optimal choice" (e.g., in terms of mathematical results achieved, possibility of getting a good recommendation afterwards, personal growth, etc.)? Clearly, referring to research papers in mathematical education that partially support your remarks will be highly appreciated (although it is not necessary).



Side note: Just to clarify a little further: I've only said that the mathematical aspects and the advisors are equal to me, and what I'm asking is what else I should take into account when choosing a research area.
There is no "optimal coice". Getting "good" results, and recommendations does certainly not only depend on the choice of the topic, but more on yourself and your motivation. And that is the point. If all possibilities seem to be equal I would apply for the group in which I feel most welcome. It is so important to be in an environment in which you are allowed and encouraged to fail often (and early); where people leave titles at the door; where you can build on ideas of others and people dare to be wild and have fun !

Forget the results and, the recommendation afterwards. Do what you like to do, together with people you like and the results will be good automatically. You will find opportunities for future projects you never thought of yet. And to be honest, I do not think an undergraduate research project will change your life. Explore your style of work, your weak and strong sides and be open for ideas. I would not expect too much at this stage ("in terms of mathematical results achieved").

OK, that was a statement based on my personal opinion, but it is based on my personal experience as a PhD.