How did the intellectuals ( philosophers and economists) in the 19th century regard socialism?
Socialism was a movement of the second half of the 19th century. It came in tow different flavours, a secular and a Christian variety. Both responded to the plight of workers and the horrible conditions of the slums in large manufacturing cities.
The socialism of Karl Marx and Friedrich Engels influenced thinkers such as George Bernard Shaw and Oscar Wilde. The Fabian Society was a group of English socialists that had many famous intellectuals, notable Beatrice Webb, among its membership.
The Roman Catholic "worker priest" and many other religious movements fused socialism with Christianity, seeing socialism as furthering the Christian mission of caring for the poor.
Just as in the 21st century, so in the 19th, some intellectuals were supporters of socialism and other disagreed with it.