Up to you. Eating disorders are rare in males and can be tough to treat whatever one's gender. If he recognizes the problem and is seeking help and the two of you otherwise have a good relationship, it's neither contagious nor dangerous to you. But, if he expects you to support his bad eating habits or grows angry if you mention them, then leaving may be your best option. It often is quite chronic.
Eating disorder. Is a condition that can be treated. So if u care about each other u can support him and encourage him to accept treatment.
Other problems? How would you answer this question if someone asked "my boyfriend has diabetes--stay or go? " people do not choose eating disorders, they are illnesses, not character flaws. If he will accept your loving, informed help, stay. If he angrily rejects your concerns, you may need to go.