The abstract of the paper you cite refutes the idea that sex differences in choosing STEM careers are due to girls being conditioned to assume they are not smart enough:

"Gender differences in beliefs about academic ability explain a small and insignificant part of the gap; this allows me to rule out females being low in self-confidence as a possible explanation for their under-representation in the sciences. Conversely, most of the gender gap is due to differences in beliefs about enjoying coursework, and preferences."