Welcome!!

And kudos for looking into a shelter or rescue instead of buying

Very good
This dog is not going to be the easiest for you. But really-no dog is a walk in the park. They take work and money and work and money

lol
So it just depends on how commited you are. This dog can certainly become a confident loving member of the family-from your description it sounds like he was in a very unstable home and is just really unsure and anxious. This CAN be fixed.
The quesition is-on you (as it always is-the dog is never bad or evil-it's always the situation-as you can see he was not in a good one and it's hurt him)
So
1)do you have the time to spend on this dog-working with him daily on his fears?
(we can help you with this and guide you-we do like helping and have many great members who are very experienced with training).
2) Can you afford a trainer if things are not going well? Can you afford (I'm talking time wise as well as money) to do some classes with him if you need?
3) Is hubby on board to support you and help you along? It's never easy so if he's going to get impatient or upset-or is he going to be supportive and helpful? All family members need to be on board.
So I guess that's the long and short of it-it's totally up to you

We can for sure be supportive, encouraging and offer suggestions
Oh and please keep us posted on your decision

Welcome