As Spock would say, fascinating. I wonder if he would also still remember yesterday like it was yesterday, or like it was 20 years ago, or maybe like it was 20 years ago at first but more easily after being immersed in the present again... Well, I'm not volunteering for that one.
I noticed when I went back to the episode that I had missed the first few minutes because it was not a holodeck but an inserted virtual memory that worked as a type of virtual prison punishment. So Miles would experience whatever they programmed and the length of it, which was 20 years.
When he got released from the virtual prison, he did indeed experience problems like being shocked that everyone was the same age and he even had some problems (for obvious reasons) getting back to work and even remembering some of the work he had done.
The doctor at the station, Bashir, helps him out with a sedative he has to take for some time, which takes the edge off some of the hallucinations and trauma he feels. He also gets a captain's order to do therapy sessions.
-----------------------------------------------------------------------
Going back to the holodeck, there is an episode called Our Man Bashir (S4E9) from Deep Space Nine that is interesting. In this episode, some of the crew disappear while being beamed to the transporter room, while at the same time, Doctor Bashir and a friend of his are on the holodeck doing a James Bond theme.
So the crew that never got beamed into the transporter room correctly has their energy somehow trapped in the holodeck game. The plot then thickens when Bashir is informed that if something were to happen to his crew inside the holodeck game (that has taken roles of some of the enemy), they would also die in real life.
So it is kind of an interesting episode when the holodeck becomes reality while the crew on the station tries to convert the power source and get the people back from inside the holodeck game and back inside the transporter room.
If I also remember correctly, the crew when they came back had no idea they were trapped inside of the holodeck, so they would have potentially died without ever knowing what happened to them.
-----------------------------------------------------------------------
I also remember in Star Trek: The Next Generation that some would use the holodeck to try out some romantic fantasies and even use it to test different hypotheses while communicating with holo versions of dead scientists. For me, it seemed that the holodeck would often work in favour of doing different types of combat, practise tennis or similar, romance, visiting an old friend, but there would also be those in TNG who could get a little bit addicted from time to time.
-----------------------------------------------------------------------
Going back to the question of "could humanity handle it?"
@Zed Clampet, I think an evolved form of humanity would manage to deal with its side effects, but for us to get something like that now would be quite devastating. If by some chance we did get it, I think the only right way to use it would be strictly for scientific purposes or other fields for strengthening humanity and flora/fauna around us.
Obviously, considering how we abuse new technology incredibly fast (AI as the new example) for economic and military purposes, I don't see it as very realistic that we would have been able to keep it in a grounded moral and ethical arena. I guess you could also use the argument that "you have to use the technology to be better at understanding and using it correctly," but it seems to me that most often this is not the case at all; it is not the betterment of humanity, it is the betterment of a very few by manipulating said technology.