Do core electrons in bulk material have discrete energy levels or continuous energy band?
What happens with energy levels of core electrons in the bulk, as the
  lattice constant is changed? Do they form a continuous energy band in
  the first place? Why?


Using an organic example, as you move from ethylene to butadiene to hexatriene, you have 1, 2 and 3 bonding and antibonding pi molecular orbitals respectively. If you continue this chain extension and wind up with a very large polyene, the energy difference between all of the bonding (or antibonding) orbitals becomes smaller and smaller.  In addition to this compression between energy levels, each molecule is in a slightly different environment.  Some are near the surface, some deep in the bulk, some have a structural deviation or packing non-uniformity close by.  This serves to broaden the energy width of each orbital.  Between the energy broadening of an orbital and the compression of the energy separation between orbitals, one can imagine a limiting case where all of the bonding orbitals are so close to one another that one continuous band, the valence band, exists. The same would be true of the antibonding orbitals and they would merge into a continuous conduction band. The only remaining separation is the separation between the valence band and the conduction band.  This separation is referred to as the band gap.

In the real world, at least at normal pressures, this limiting case of a single band comprised of all bonding orbitals seems unlikely. Instead, some orbitals where the energy separation between them is large likely form separate bands.  In this case, the HOMO would still broaden significantly (as would the other molecular orbitals) and transform into the valence band, remaining distinct from the other bands at lower energies.

Still, it is difficult to probe the bulk and to understand exactly just what the situation is there. X-ray spectroscopy probes to a depth of only a micron or so, so it is really examining the surface states.  Certainly at least some of the molecules at the surface retain their individual orbital identity and are not part of the band structure.  Therefore it is not surprising that XPS (since it probes only the surface) can detect individual orbitals and serve to identify materials.