The earth, including its inhabitants, does not retain this energy, but (after some while) re-radiates it all back into space. However, the re-radiated energy is in a high-entropy form, namely what is called ‘radiant heat’ – which means infra-red photons.