I can't believe the doctor does not see a problem with this. I think she has an eating disorder, sounds like anorexia to me. Obviously this little girl has a lot of issues and self image is a big one. There are children this age contemplating suicide nowadays - you might want to consider asking the psychiatrist for a gp referral to find a doctor who understands these types of problems.
You don't say whether her biological mother is in the picture or not, but I wonder if there are unresolved issues there, and with daddy remarrying and having another child?
I think you might have to approach this on a few different levels. For now,if it were me, I'd not push the physical activity as all that is doing is burning up the small amount of calories that she is taking in.
What does she drink? Any chance of "doctoring" them to add more calories (even "empty calories" for now). Maybe get powdered Gatorade electrolyte mixes (or Pedialyte)and use them to make up like Kool Aid instead of plain water, or if she likes milk shakes, mixing some dried milk powder with the regular whole milk and adding a few extra calories and nutrients that way. Even maybe getting something like Slimfast but using it as an addition to the diet instead of a meal replacement, but because they are basically a meal, she'd be getting some extra nutrition.
Are there ANY foods that she really likes? Something that she does find it hard to say "no" to? If so, I'd just have them around so that she was wanting to eat. Right now, I'd not even worry about healthy snacks and such, I'd just let her eat anything and everything, whether it was junk food even. Just to start getting the weight back on while you got to the root of what was really the matter.
Obviously the school believes you have a problem for them to be watching her there.
I would suggest researching online for anorexia information and finding some support with one of those, they would be far more able to direct you in how to work towards helping this little girl. It might even be necessary to hospitalize her and have her evaluated that way, but they would be able to give you all the options available.
I am so sorry for all of you, it must be heartbreaking to be going through.
Now, the grandparents. Are they your husband's parents? What about them, do they have similar problems with her eating when she is with them or does she eat normally over there? Maybe you can enlist their help too?
Keep us posted, this is a bad situation and she should definitely weigh more than she does.