TL;DR: Yes, any structure deforms if you put a load on it.
Even adding an ant on top of a granite mountain will change (lower) the height of the mountain - imperceptibly so but it will still change it. The problem is that its not possible to measure it.
That is the whole idea behind Young's Modulus (modulus of elasticity).
Essentially, all materials behave as springs (at some level). One might argue that the forces between molecules in the material are acting as springs.
Figure : source www.tf.uni-kiel.d.
The energy when you are pushing against the wall is stored in the potential energy of those "springs", so when you remove the acting force, the wall will "bounce back".
more formal explanation (not quite)
This is my interpretation (apologies if this does not fall under all material cases).
When the atoms of solid are arranged in space (lets assume a lattice structure like the above example), the distance between the atoms is such so that the potential energy is minimal. The energy between the atoms follows a relationship like the following (this is for the molecule of Hydrogen but in principle a similar exists for crystallic lattices):
Figure 2: A Plot of Potential Energy versus Internuclear Distance for the Interaction between Two Gaseous Hydrogen Atoms. (source: libretexts
The atoms want to settle at the lowest energy point. If you compress/pull them apart then you quickly get a response back, which is the force. The more you pull/push, the higher up you go to the potential well and the higher the force.
Additionally, if you remove the external stimulus (the force you are applying), all that potential energy quickly returns the material to the "resting state".
(That doesn't explain plastic deformation, but its beyond the scope of this question).
Where does the extra energy go
Only a small part of your energy you are expending when you are pushing on the wall is stored as elastic energy.
The rest of the energy that is being burned away, is converted to heat from you body which is trying to maintain the force.
I guess an example that can help you understand that, is if you try to hold a bottle of water on the palm of your hand. You can try it in two ways
- like the following image (arm extended)
Figure 3: bottle in hand not supported (source: saltysoulsexperience.com
- everything is the same apart from the fact that you can support the back of your hand on a table.
You will be able to sustain position 2. a LOT longer, and the only reason is that the muscles will not need to contract as much in the second case.
An excellent book about this is Prof. Gordon's "The New Science of Strong Materials: Or Why You Don't Fall through the Floor", although it has only a handful of equations if you are interested, and its almost bed time reading (or sometimes a bit more than that).