How did this happen? Was there a famous Slav who served in the Spanish government? Why is Spain apparently the only non-Slavic country to use this name?
As a somewhat related question, what ties were there between Spain and Russia in the eighteenth century and earlier? Did they have much diplomatic interaction at all?
A person responsible for the presence of the name Stanisław in Western Europe was probably Stanisław Leszczynski, a Polish-German nobleman from Silesia, who after numerous attempts to be elected king finally settled as a Duke of Lorraine. He mostly abstained from politics there, devoting a lot of his time to philosophy and arts. He was also father of Queen Marie (Maria Leszczynska) of France.
Another famous Stanislaw was St. Stanislaw Kostka, a young Jesuite monk famous for his visions and his escape (on foot) from Wien to Dillingen in Bavaria. Unlike many Eastern European Saints, young Stanislav lived most of his life on West and was buried in Rome, and was fairly popular thorought Europe.
'Estanislao' also exists as a given name in Italy, Portugal and former Spanish and Portuguese colonies of course. It is uncommon but not surprising because there is a Catholic Saint Stanislaus - Polish Stanislaw Kostka, canonized in the 18th century.
Diplomatic relations between Spain and Russia were punctual and non-continuous before the 18th century (Page 7 - Establishment of the first Spanish embassy to St. Petersburg, 1720s) The first ambassadors were interchanged between Charles I/V and Basil III of Moscow in 1523/24 (misidentified as Basil IV in the source). The next Russian embassy to Spain was during the reign of Charles II in 1667.