It's a common belief within the science fiction community that sci-fi has motivated a lot of people to pursue careers as scientists and engineers. A brief search finds many anecdotal accounts where people credit sci-fi for their scientific career, as well as attempts to intentionally create inspiring fiction, such as this novel-writing collaboration involving NASA:
Authors will be paired with scientists and engineers from Nasa's Goddard Space Flight Center at a two-day workshop in November, where the as-yet-unnamed writers will have access to Nasa data, facilities and experts, and will learn more about space exploration. Nasa and the publisher will then bring out a series of science-based novels – the "Nasa inspired works of fiction" line – which will be based on "concepts pertinent to current and future agency missions and operations". [...]
The pair hope the collaboration will raise awareness of science, technology, engineering and maths, and inspire more students to specialise in the subjects, as well as increasing knowledge of Nasa's own work. Science fiction, they said, is credited as a "significant inspiration" for many scientists' career choices.
However, I'm not aware of any scientific studies that would have attempted to verify and quantify this impact. It could be that the correlation between "interest in sci-fi" and "interest in science" isn't necessarily causal: maybe the kinds of people who are drawn to science fiction are also the kinds of people who would be drawn to science regardless.
And although there are anecdotal reports of highly specific correspondences between the kind of fiction consumed when young and the interests that one has pursued as an adult - such as really liking space exploration stories when young and then pursuing a space-related career - this could also be an instance of the Texas sharpshooter fallacy. People who like a genre are likely to read widely in it (thus reading about many different aspects of science), and there are lots of people reading sci-fi, so we should expect to encounter many such "liked stories of X previously / now works with X" correspondences purely by coincidence.
On the other hand, articles such as "CSI fuels forensic science degree rise" would seem to suggest that fiction really does have a significant impact on people's career choices:
The number of undergraduates studying forensic science and crime scene science has more than doubled over a five year period to 5,664, it was disclosed.
A third of students taking degrees said they had been inspired by TV coverage of the profession, the study said, although it insisted it was not the main reason.
But I would still be interested in any studies that attempted to quantify the possible career-choice effects of science fiction more rigorously.