At least in Germany you have a legal duty to have a passport or ID card, if a police officer asks for one but you don't have it, you'll either be brought into the next police station (if you don't have a legal address) until it clears up or show up at your nearest police station within 24 hours or up to a week, depending on the situation. Though generally if you don't have it, you usually get an oral warning and have to, as mentioned, bring a valid document of identity to a police stations (sometimes not even that). Going directly to the station is very rare in my experience.
Not having a document of identity at all is grounds for a fine of up to 3000€, though if you travel from outside the EU you'll have your travel passport anyway.
Netherland and Portugal have a similar law.
Austria has a similar law but only for non-austrian persons in Austria.
When you cross borders, even in the EU, you should be prepared that you might get controlled/checked, it usually doesn't happen but it's good to be prepared.
Not having a document of identity at all is grounds for a fine of up to 3000€, though if you travel from outside the EU you'll have your travel passport anyway.
Netherland and Portugal have a similar law.
Austria has a similar law but only for non-austrian persons in Austria.
When you cross borders, even in the EU, you should be prepared that you might get controlled/checked, it usually doesn't happen but it's good to be prepared.