Since Germany and Spain are both in the Schengen zone, there is no customs or immigration to clear at BCN.
And ... since Ibiza and Barcelona are both (still) in Spain... and you don't go through Immigration on departure in EU, Schengen or not ...
This is what to do:
1. Find cheapest EU-LAX flight. It will likely be from a hub so LHR, FRA, AMS, CDG or lesser hubs like MAD, CPH, MUC, MXP, LGW etc
2. Fine your cheapest flight from Ibiza to that hub on a budget airline. Allow plenty of time to connect. At least three hours.
I think you're cutting it far too fine in BCN. What if your flight from IBZ is late? Will your Plan B (you do have a Plan B?) cost more than what you save by choosing this connection?