I’ve had back pain problems and here are some things I think help.
1. Get the pack off your back. Getting bottles and cages and putting the rest of my gear in a seatbag was one of the best things I ever did for my back.
2. Get your bike fit right. A short person with a long torso might ride the same size bike as tall person with a short torso. If you are too stretched or too cramped in your riding position, it will strain your back. Fit charts that rely only on height should be taken with a few grains of salt. I’m 5’9″ but I ride a size XL bike.
3. Cut your handlebars. Most bikes come with handlebar widths suitable for size XL bikes on all their bike sizes. You need to cut down the bars for your size.
4. Get your handlebar level or above your saddle. Use riser stems or riser handlebars if needed. This makes you less bent over.
5. Get a bike with a steeper seattube. A steeper seatube makes you less bent over.
6. Get a 29er. 29ers roll over chunder easier than small wheeled bikes and send less shock and vibration through your back.
7. Ride wider tires. High-volume low-pressure tires add a pleasant bit of cushion which reduces shock and vibration. Put the widest tire on your bike that will fit. Most bikes will fit at least a 2.4 rear/2.6 front tire.
8. If you prefer a hardtail, get one with 29×2.6 or wider tires. Salsa Timberjack/Rangefinder, Trek Stache, Specialized Fuze, Rocky Mountain Growler, and many more.
9. Get a full-sus 29er. Even the shortest 100mm rear travel bike significantly reduces shock and vibration compared to a hardtail. Long travel is not necessary. You can get some very good 29 full-sus bikes for less than $2300. Shorter travel: Giant Trance 29 and Kona Hei Hei. Longer travel: Trek Fuel EX, Commencal Meta TR, YT Jeffsy, Vitus Mythique, and many more.
At 5’9″, I ride an XL Trek Full Stache with 28″/710mm wide handlebars set higher than my saddle, steep 76 degree seattube, 29×2.6 tires front and rear, full-sus 130mm front and rear travel. It’s the most comfortable bike I have ever owned. No more back problems!!!