That is so sad.
. First, the poor pup has been abused. Second, the pup has changed homes a few times. He has had his world torn apart. Time will help. He will begin to feel safe and secure which will help.
My Mikki didn't have the best home before we got her. When we got Mikki she would hang out by our door like she wanted to leave. We have had her a few years now and she is COMPLETELY different. However, with that said, she still has what we call "episodes". She will run and hide under the bed or couch. We go get her and comfort her. Time heals the wounds. You will have to be patient and show him how much you love him. Hopefully, he will feel he is safe and adjust quickly.