look up calisthenics routines and especially gymnastics routines involving static holds. You can build incredible strength and build some muscle while working movements in very weak positions (meaning not a lot of absolute force is exerted, though the relative force will be off the charts).
I would highly recommend you get your hands on convict conditioning and see how that works for you.
Good call. I am in a similar situation as TS (spinal hernia, shoulder problems) so I can add my 2c:
1. Physical therapy.
Yes, I saw that TS said he ain't got the money for it. But seriously, your health is the most valuable thing you're got. Save some cash, cut down on stuff you don't need (cigs, beer etc.), maybe sell stuff on ebay? Visit a legit certified physical therapist - even one visit can change your life. Not kidding. There are muscular imbalances in your body that you are not aware of - a good physio will fix that or give you special exercises for you to fix that over time. It may take a week or it may take a year but in the end you will not regret it.
2. Calisthenics and pilates.
Yeah, it's not the same as pumping iron BUT you can get very good results while minimizing injury. I now do pullups, pushups and squats DAILY and I feel much better than when I used to go to the gym 3 times per week and do the regular split routine. No injuries, more energy and even no DOMS, while my body keeps getting stronger, visibly leaner and more chiseled - and I'm 30! Start slow and don't force yourself. This is super important so I will repeat: START SLOW. If you can't do a pushup, start with wall pushups. Do them slowly with good form. Only after you've mastered an easy exercise move on to a harder one. The aforementioned "Convict conditioning" book emphasizes this smart approach.
3. Eat healthy!
This is an important aspect which many people neglect, since we've been told for many years that "a calorie is a calorie" and you just need to burn more than you eat if you want to lose fat or eat more than you burn to gain weight. NOT TRUE AT ALL! A calorie coming from vegetables is great for you, while a calorie coming from sugar is KILLING you. Google dr Robert Lustig for an eye-opening research on the topic. For protein eat lean meat, dairy and legumes.
4. Rest and sleep well.
Also not deemed important by beginner lifters, getting enough rest is absolutely vital to your progress. If you're not getting your 7-8 hours of sleep per day you are killing your gains. Go to bed early. Put away your smartphone - blue light stops melatonin production. Read a book or meditate to chill out. Get rid of the alarm clock if you can. If you have to get up early for work then go to bed early as well.
5. Manage expectations and enjoy.
Rome was not built in a day - and your body won't be either. It will take a lot of time and discipline. I'm a hard gainer and I've spent 10 years (!) doing all kinds of training before I looked in the mirror with satisfaction. And that's another thing - learn to like yourself as you are. Setting goals is fine but "be the biggest guy in the gym" is a stupid goal - there will always be someone bigger, there will be guys on steroids etc. and you don't need to take that road. Train for your own pleasure and satisfaction rather than to one-up somebody. It's a hobby and it should bring you joy, not frustration. Enjoy it!
I hope the above advice is helpful. Good luck!