If you have residency in a Schengen country, temporary or not, this allows you 90/180 travel in the rest of the Schengen zone. The linked thread in the other answer is rather old, and so does not address the question of borderless travel now that Romania has been admitted to the borderless zone.
Your theory should be correct, though. If you use air for travel to/from Romania, as this is now treated as borderless with Schengen countries, you should have no issue flying to say, France (you can double-check with airline or immigration, though). From France, you could take a train to Spain, no problem. You'll only want to be sure to return to Romania by air, to be sure there are no issues in case they are still doing land border control.