If atoms have well define energy levels and the differences correspond to the frequencies of light that can be absorbed,
This is correct
how is it that opaque objects absorb all or most visible light frequencies get absorbed and you basically don't have any visible light coming out on the other end?
The crux of the matter is the word "objects". This means the solid state.
You must have noticed that gases are not opaque and liquids also pass a lot of the impinging frequencies. Liquids are in between solids and gases.
Shouldn't only those frequencies that have to do with its energy levels get absorbed?
This is true when atoms are free, once they are joined in molecules many more energy levels appear and some of them going to an infinite continuum even for as simple an atom as the hydrogen atom.as the quantum number n goes to infinity.
Yes I realize ordinary materials have many different compounds, but surely they don't add up to an infinite number of energy levels?
There are an infinite number of possible energy levels. What makes the difference between gases and solids is the possibilities of transition that combinatorially are enhanced and in addition that the impinging radiation can scatter and rescatter inelastically with the combined electric and magnetic fields of the solids until their energy is degraded enough to be absorbed by the soft vibrational and rotational energy levels of the compound.