My understanding (might not be fully accurate) is activities carried out in Spain are generally subject to Spanish tax, irrespective of where you are a tax resident.
A simple example is an Irish tax resident renting out property in Spain must pay Spanish tax on that activity.
Your intention is to move temporarily to Spain and to work from there. Strictly speaking you are not entering the country as a tourist. To be fully legal, the activity should be declared to the Spanish authorities and would be subject to Spanish income tax and probably also to Spanish social insurance contributions etc.