An aging population is drawing workers to medical and social care, creating reliable jobs and revealing weakness for the rest of the economy.