You are still comparing apples and pears - but I think I can see what you are getting at.
Recap:
When you excite an atom, the electron is still bound to the atom.
If you excite a metal, the electron is still bound to the metal.
In both cases, the incoming energy must be exactly a transition energy between two levels.
For a photon to knock an electron off a metal, it must have energy at least equal to the work function.
If the energy is more than the work function - the difference is the kinetic energy of the electron.
If the energy is exactly the work function, then the electron barely breaks out and it's 50:50 that it will go back in.
For a photon to knock an electron off an atom, it must have energy at least equal to the atom's ionization energy.
If the energy is more than the ionization energy - the difference is the kinetic energy of the electron.
Basically the same as for the metal.
I'm thinking: you may be asking why empty space does not have discrete energy levels like inside an atom - is that the case?
But you may also be asking why you cannot eject an electron from a metal by giving it energy exactly equal to the work function.
Or it may be something else.