Ok. I see. Let me try to help you here. You must play your cards right. Schools must deal with custody issues all the time. Once, I had divorced parents screaming at each other in my classroom at an Open House! Teachers watch and assess parents very carefully and they form an all-important opinion.
Whatever you do, keep your tone calm and non-accusatory. As the stepmom, you're at a disadvantage already. DO NOT come across as being a stepmom who just wants control over the child. You don't want to seem pushy and controlling. You want to appear as though your care and concern for your child is priority. Whether or not she is with you or her biological mother.
When you conference, be sure to ask them, "Do you think that her poor nutrition and anger toward her mother could be causing some of her behavior problems at school?" Ask: "What can I/we do to help her academic and emotional success?"
Teachers LOVE it when parents ask for help or advice about how to help the child succeed.
In order for the school to get involved in custody issues, the child has to show clear signs of abuse. The underfed thing is not as pressing because the child is eating two meals at school every day. I know of a similar case and the child did not get removed from the home over this.
Your better route is through the mother herself. But it CAN'T be you or your SD to ask. Mothers are territorial creatures. She won't want to hand her over to you if she knows you want her. What is her relationship with your husband (her ex)? Can he talk to the mother? It sounds like this child is giving her mom a lot of headaches, and an easy fix would be to let her dad take over. But if she thinks for one minute that you will "win" she won't give in. Advise your SD that if she wants her mom to let her live with you, she can't make her jealous of you. She should not go on and on about how wonderful you are to her mother.
Have your husband talk to his ex. Don't make it seem like you can do a better job of raising her daughter. Your DH should make it seem as though he wants to help his ex with the headaches of their little girl and that maybe he can help "straighten her out" some because little girls do listen to their dads more. You should NOT be a part of this conversation. It shouldn't be about how you would be a better mother to their little girl. At all! C'mon. What mother would give into her ex's new wife and admit that she would be a better mother?
Use your head. Act wisely. Swallow your pride. And be prepared. Even though the little girl loves you now, her behavior problems will continue to some extent with or without your structure and good parenting skills. She has had a lot to cope with and has a lot of exposure to negative role models at an early age. It will not be as easy as you think during her adolescence especially so I hope your concern is truly for the child first and your pride second. Your love for her needs to carry you through all those tough years.
Sorry to be blunt, but I'm trying to help.

Good luck.