¡Hola!
In three weeks you may visit a great number of places. If you don't mind I will suggest you some.
If you visit Ibiza I will consider visiting also Mallorca and Menorca, the other islands of the Balearic Islands. The beaches of Mallorca are a paradise.
In the northwest of Spain you have Galicia a rural region very beautiful. Don't miss some of their plates (Tarta de Santiago, empanada gallega,...).
In the north we have Asturias, Cantabria and País Vasco. Asturias is a very beautiful place to visit. In Cantabria you may go to Santander. El País Vasco has some places which are delightful (Fuenterrabía, Irati and Elizondo are a good example). In La Rioja, in the south of País Vasco you may taste their famous red wine, Logroño is a must-visit.
In the North-east of Spain we have Aragón and Cataluña. Aragón has some isolated valleys which I will consider to visit if you like the mountain (Jaca is a kind town).
In Cataluña, apart from Barcelona, you may visit Monserrat and Lérida.
To the south we have Valencia, very famous for their oranges and lemons, and for the paella. Don´t miss Valencia itself. Alicante and Castellón are good places to visit.
In Murcia La Manga del Mar Menor is a very touristical place, and a curiousity you should not miss (it is a closed sea).
Andalucía, in the south of Spain, has a lot of places I would visit if I were you: Sevilla (great!), Granada (with the Alhambra, an old muslim palace), Cádiz, Las Alpujarras (little villages built on a mountain), Córdoba (with its mezquita). You may visit Doñana (a national park) or Medina Azahara (another muslim palace).
In Castilla-León there are also a lot of places to visit: Ávila (with the Muralla), Segovia (with a roman Acueducto), León (the best cathedral of Spain I will say), Burgos, El Bierzo (near Galicia, some of the more beautiful forests I've seen).
In Castilla la Mancha you should see Cuenca (with the Ciudad Encantada, a curious zone carved by the water), Toledo (this is a must-visit, it has a superb medieval ambience, and some of the best pictures of El Greco).
The Canary Islands are a great choice if you want to see a paradise. Some volcanic beaches with black sand. Very good weather and tropical fruits.
Finally, Madrid (where I am from) has many great places to visit. In Madrid itself you have three great art museums: Museo del Prado, Museo de Arte Reina Sofía, Museon Thyssen-Bornemizza.
Watch the Palacio Real, walk across the Plaza de Oriente, see all the churchs of the centre.
Visit the Catedral de la Almudena. Don't miss the Puerta del Sol. La Puerta de Alcalá, La Puerta de Toledo, la Fuente de la Cibeles and la Fuente de Neptuno are some other monuments (I will not end if I number all what you can see here).
At 80Km from Madrid it is San Lorenzo de El Escorial. Don't miss it! There is a Monastery-Palace-Pantheon which is considered one of the best monuments in Spain.
You have also La Granja, the Palace of Riofrío, in the mountain Las Lagunas del Peñalara (if you don't mind to walk up the mountain for 5 hours). See the national park of El Pardo and a beautiful town: Aranjuez. If you can visit also Chinchón and Medinaceli, two small villages with a lot of charm.
I hope I've been of some help ;-)