To the OP: your trip sounds like it might be too short for it to be worth the effort of trying to do a race over here. However, if you are set on trying to find a race, try going to the website of regional cycling federation (google "federacion ciclismo name of autonomous region") of the area you want to race in and look for the calendar. (For example, to list the areas most likely for that time of year: Madrid Andalucia Valencia Murcia Catalunia) Once you identify a possible race, send me a PM and I'll see if I can find out any beta for you.
The riding over here is great, though, so if the racing doesn't work out, you should definitely try to hook up with a group - even the smallest town will have a cycling club that meets saturday or sunday morning. Another option would be to try to do one of the competitive cyclo-sportif type rides, though that's a bit early in the year for the big ones. I think the logistics of that would probably be easier than racing. Look on those same regional websites under "cicloturismo" for information.
I've been meaning to write a post about the logistics of racing in spain, as seen from someone used to the US system, as a reference for others. I'll see if I can summarize what I've learned after a season of racing "unattached" over here:
Licensing: For specific events, I think you can get an international licence through USAC, though the process may be a pain in the ass, I think it's only valid for specific events. Getting a license through the spanish cycling federation is kind of complicated, you do need a doctor's certification and a team or club affiliation. Not rocket science, but kind of time consuming. I think with any other UCI license (i.e. from Canada), you could just show up and race, but that's a guess.
The categories: Basically, it's totally by age, and most races only have one field. There are two main groupings:
Elite/u-23 - Technically, "elite" can be up to 30 years old, but in practice, the two are essentially synonymous. This is basically a P/1 field, dominated by the development squads for pro teams. In some races, the u-23 will be separated from the elites in the results, but this is not typical. In any case, the u-23s on the road to the pros generally drive these races anyway. I'm barely fast enough to watch these races from the side of the road, so all my knowledge is second hand...
Masters - Technically split up into Seniors (over 25), Masters 30, Masters 40, Masters 50, but there's only one peloton, so the pace is dictated by the fastest guys, regardless of age. "Former TdF contenders" might be stretching it a bit, but the front of the race is mostly made up of former continental pros or guys who aspired to that. As an average Cat 3, I consider it a good race when I finish inside the time limit; YMMV. From what I can tell, it's like P123 field in the US, but with a huge field, so there are 30-40 really, really fast guys dictating the pace of the race instead of 5-10.
Teams are very organized and work for team leaders; technical support is by your own team car, so I usually race with a tube and a co2 inflator. The results sheet will often list the top 3 finishers in each age group, but all the prestige/money is on the overall finish regardless of age. There is talk that starting next year, the senior category will be abolished and everyone under 30 will have to race with the elites, so this may change over time.
The racing: You will get the whole road. The peloton will be big, almost always 150-200 riders. There will be motorcycles zipping past the peloton constantly as the cops cycle forward to close the next crossroad. You will have close calls with "road furniture." There will be at least one short 20+% climb passing through a small town that you weren't expecting. All the people drinking in the bar in that town will come out and cheer as the race goes by. The general level of bike skills is very high - I've seen one crash all season. Because there are no beginner categories, the vast majority of racers have been at it since their teens.
Finding and registering for races: Each autonomous community has its own cycling federation and calendar, but the best general source I've found for finding out about races is the forum at foromtb.com. You have to be kind of flexible - advanced information is not always as available as we are used to here. A lot of times, it isn't assured that the race is even going to take place until the week before. Except for the larger stage races, I have never found it necessary to pre-register; instead, just show up and pay on race day. For pre-reg for stage races, you will need a spanish bank account to be able to do a direct transfer, as I have yet to see one that accepts credit cards.
I think I'll stop there.