Does top colleges like UPen perfer students taking 4 years single foreign language?

It depends on the college, but in general, the universities with separate admissions for engineering tend to be more lenient regarding high school foreign language for engineers. You should spend some time looking at the different schools that she likes to make sure that less than 4 years is ok. My D only took up to level 3, so she only targeted schools that didn’t require or recommend 4 years, and there were certainly plenty of top engineering programs that fit.