You have confused a couple of things here.
The spatial band diagrams you see ( they are flat - if there's no electrostatic drop within the device) are in the position space.
They give information about the electrostatics of the device, such as, the depletion region drops, charge neutral parts, the source barrier etc...
It is in REAL space.
The E-k diagrams, on the other hand, which are used for extracting effective masses, are in
momentum space. They are functions of different momenta and subbands.
So you can visualize it this way: At every point of the spatial band diagram, you can put a parabolic E-k diagram and look into what's happening in the E-k diagram.
This is typically done in the analysis of ballistic devices, where the population of negative and positive (momentum) states are nicely decoupled into two sets in real space, coming from two different contacts.
Anyway, so there are TWO types of band diagrams frequently mentioned in the literature, E-k is NOT the flat diagrams you see.