You need a visa for Pakistan if you have a Spanish passport
Visa options for Pakistan
Electronic visitor visa
Travellers need a visa to visit Pakistan for Business or Tourism. An eVisa is the fastest and easiest way of obtaining a visa for Pakistan because travellers can submit their application and supporting documents online. Once the application is approved, travellers receive their eVisa confirmation electronically.