Chronic fatigue, tiredness, general "out of it" feeling, back/flank pain, GERD, IBS, migraine headaches, palpitations, waking from sleep with racing heart, low vitamin d levels, ferritin level of 14, TSH fluctuations; what could this be?

Multiple issues that. you seem to be addressing w/doctors. Stay in touch w/them. Also, consider a Micronutrient panel to see the nutritional status of your body. Spectracell lab in Texas has an excellent one. Check out their website. Peace and good health.
See internist. This problem is so complex that I would urge you to see an internal medicine doctor ASAP. Gluten-intolerance is one condition you will need to rule out but there are also issues which cannot be explained by gluten intolerance alone. I presume you have significant anemia as well. Please keep us update on the findings since getting feedback helps us to do a better job in the future.
Multisystem complain. in patients with multiple system complain ,I suspect underlying anxiety/depression. I will recommend complete check up and also treat anxiety/depression.