There have always been people with illegible handwriting - we used to have a family competition to decipher a couple of people's Christmas cards. Historical documents are full of illegible stuff - sometimes it's a question of getting used to reading a particular handwriting style, but sometimes, it's just unclear.
I was one of the last in the class to be allowed to move from pencil to pen age 8 or 9. The next year, my maths teacher said I'd never pass any O-levels as my handwriting was so bad - well, I didn't, because they were GCSEs by then, but I passed those well. I think my handwriting is pretty legible now - I can read back in old diaries and so on. I do write pretty much every day - I'm forever writing myself notes, to-do lists, shopping lists and the like, but I also do evening classes, and take notes in class. I think differently when i write, rather than type, and I'm more like to remember it. I also write old fashioned letters sometimes.
There's a book by Philip Hensher, the Missing Ink about how we used to know our friends' handwriting, and now we often don't. It was my birthday a few weeks back, and I do still recognise the handwriting of friends from school and my aunt and uncle. I also had a card from a newer friend and was surprised his handwriting looks more like what I'd expect from an 12 year old - bug I suspect, like many of my colleagues in tech roles, he simply hardly ever writes.
I'd probably struggle with a 3h exam these days - my hands are currently aching from 3 days of pulling out ground elder roots from the garden. I asked a teacher friend if they prepared for exams, and he said they do at his current (private) school - they give them hand exercises to do. I don't know if that's common in most secondary schools - back when we used to do writing all the time (and i did essay-heavy subjects, particularly history,) even then, my hand could start cramping towards the end of an exam. It's probably a lot worse these days for more people
I think that the decline in "nice" handwriting is mostly down to lack of use these days - many people can get by with almost never using a pen, and a writing hand is like any other muscles, use it or lose it. To be good at something, you have to practice.
I enjoyed reading Rosemary Sassoon's history of handwriting in the 20th century (can't remember the exact title. It may be a niche interest, to be fair... but it reminded me at school doing lines and lines of zigzags and waves and loops as part of learning to write.