Spain’s independent fiscal authority (AIReF) estimates that in 2017 non‑European immigrants had a positive net annual fiscal contribution of about €4,200, mainly because they’re younger and draw fewer pensions in the short run.
Also, the ‘half a million’ you mention is being discussed as a régularisation, not necessarily 500k new arrivals overnight.
Finally, if you have a source that shows ‘unskilled African immigration is a net tax loss in Spain’ (with definitions and data), share it…