Decent hypothesis, but not substantiated.
In 2020 the fraction of graduates who were STEM in China was 41%, Russia 37%, Germany 36%, Iran 33%, India 30%, and France 26% [1]. If we take the eleven countries in that article's GDP per capita, we find no statistically-significant relationship.
[1] https://cset.georgetown.edu/article/the-global-distribution-...