Despite efforts to attract and maintain diverse students in the science, technology, engineering, and math (STEM) pipeline, issues with attrition from undergraduate STEM majors persist. The aim of this study was to examine how undergraduate science students’ competence beliefs, task values, and perceived costs in science combine into motivational profiles and to consider how such profiles relate to short‐term and long‐term persistence outcomes in STEM. We also examined the relations between underrepresented group membership and profile membership. Using latent profile analysis, we identified three profiles that characterized 600 participants’ motivation during their first semester in college: Moderate All, Very High Competence/Values‐Low Effort Cost, and High Competence/Values‐Moderate Low Costs. The Moderate All profile was associated with the completion of fewer STEM courses and lower STEM grade point averages relative to the other profiles after 1 and 4 years of college. Furthermore, underrepresented minority students were overrepresented in the Moderate All profile. Findings contribute to our understanding of how science competence beliefs, task values, and perceived costs may coexist and what combinations of these variables may be adaptive or deleterious for STEM persistence and achievement.