Yes, you’re correct. The non-resident property tax is a mechanism to collect a tax from non residents who own a property here and don’t rent it out. (If they do rent it, they are obliged to make a quarterly tax return and pay tax on that income.)
It’s based on the catastral value of the property, and there’s a complex formula to calculate it.
If your estate agent didn’t explain it all to you at the time of purchase, they should have done so, and more importantly, your lawyer should definitely have made you aware of it, and they would usually offer to arrange to do the declaration each year (modelo 210) and make payment on your behalf.