What happens to people who have settled or pre-settled and then lose their jobs?

There is no requirement for EU nationals with pre or settled status to work in the UK to retain their status. Your rights in the UK are maintained regardless of your employment status and, if necessary and eligible, you can apply for benefits to support yourself. 

With settled status, you can also leave the UK for up to 5 years without losing that status (see also this FAQ on settled status 5-year absences).

With pre-settled status, you can leave the UK for up to 6 months without losing your continuous residence and ability to convert your pre-settled status to settled status after 5 years of residence in the UK.