The big problem was that Spain was litteraly on the other side of Ottoman possibilities : they already had to fight hard to chase off Iberian powers from Northern Africa harbours IOTL and these were mostly outposts.
Going for what was one of the core of its main opponents would basically ask for an Ottoman-wank in Eastern and Western mediterranean basins. Simply said : it would be even harder than a conquest of Southern Italy, and would require this to happen before "realistically" going for Spain. (And probably reducing Morroco into compliance in the process, which isn't going to be that of a military promenade).
It would, among many other issues, overstretch a lot Ottoman possibilities, even if every Mediterranean power act idiotically. (When, IOTL, they were particularily paranoid about the unlikely possibility that Ottomans would ever come there to stay).
At the very, very best I could see an Otranto-like tentative, except being more short-lived and mostly supported by Moriscos instead of actually Ottoman expedition.