Hmm...great question.
Spain is a member of the Schengen agreement, therefore, free movement. If you already have a Resident Permit in Spain... what are your reasons for wanting to enter Germany?
I would get a lawyer and figure out why you would still be banned, even with a Resident Permit in a member state.
How did you leave Germany (Voluntarily) without Immigration knowing about your departure?