I'm assuming this was a spoken exchange (or would that be an exchange that was spoken?) and I would say:

A) if it was spoken with the main emphasis on Span- it should be taken as meaning the professor who taught the Spanish language.

2) If it were spoken with the emphasis on the -fess- and the rest of the phrase were spoken with a relatively low emphasis then it could be taken as meaning my professor who is Spanish.

But Note:

If the phrase is to be taken as meaning a professor who was of Spanish nationality, the implications of the phrase "my Spanish professor" smack of some rather unsettling ideas about ownership.