Across Europe, it is generally not illegal to solicit contributions, panhandle, or even beg. The more clever amongst this strata make an effort at providing entertainment in return...aka ‘busking’ in the UK vernacular.
However, as long as people contribute, this practice will continue. Some, likely a small percentage of these folks, ARE genuinely needy.
But do consider that most EU countries have comprehensive social welfare programs. This is why all taxes are so relatively high.
As a general rule, nationals of a country living within the society, and known to the authorities, are provided for, according to the standards set in that country.
Also, as a frequent visitor and guest in European countries, it is inappropriate for me to criticize how they manage matters such as this. What I can do is note that, some countries have more generous welfare support programs than others. Reported statistics and migration data all support this assessment.
I can also state that, having done the research, the Southern European EU states of Greece, Italy, Portugal and Spain have much lower welfare payments, per capital, than their more prosperous Northern European cousins, e.g. Austria, Belgium, France, Germany, the Netherlands and the UK (until BREXIT at least).
All of this is offered as background to explain the solicitation of funds along the Camino routes.
Hope this helps.