Why does only the fermi level shift in a semiconductor under an external electric field?
On applying external electric field, not only the fermi level but also the band edges shift in pn junctions. The barriers in band edges actually changes with bias. See the diagrams below where the initial barrier was the built-in potential (\$V_{bi}\$) at zero bias and it changes with the applied bias.