Upvote:1
I am very sure that I answered a similar question not very long ago, but I can't find it anymore. Perhaps it was deleted by the author.
You are right that you are allowed to enter Croatia if you hold a multiple entry Schengen visa. There are some restrictions, but not likely applicable in your case.
That does however not mean, that a Schengen state consulate will issue you a visa with the purpose of visiting Croatia. If you unveil your real travel plans in the visa application to the Spanish consulate, they will unlikely issue you a visa for the trip to Croatia.