As in the question. Note that the meaning of the term is different than the one most common today. Medieval hospices provided shelter, lodgings and meals for pilgrims and other travelers.
I'm quite fascinated how extensively developed was the hospices infrastructure. Much of medieval Europe and its surroundings were dotted by chains of establishments servicing pilgrims. There were even dedicated orders who run them, the most notable being Hospitallers who later morphed into a military order.
But how exactly did these hospices operate? Did they charge? Could a penniless traveler still be serviced?
As you pointed out, during the Middle Ages there were many institutions dedicated to the care of pilgrims and the like. One example I can provide is the chain of hospitals and orphanages dedicated to the Virgin Mary in southern Italy, in the kingdom of Naples, called Annunziate as they were intitled after the Announciation of Our Lady.
They were founded from 1318-1320 in Naples, Aversa and Capua and quickly spread throughout the major cities in the south of the peninsula, to the point to become over 25 as of 1477. As you have correctly stated, hospices for pilgrims were variable but we can assume they functioned in pretty much the same way. A monastery for example, was forced by law and custom to shelter, feed and sometimes clothe pilgrims and travellers, not being able to refuse such assistance. The aforementioned Annunziate functioned in a rather similar manner.
Although they were primarily created in order to raise orphaned children and protect unwed or widowed women, care for pilgrims and the sickly was also provided. All of these services, we assume, were totally free of charge for two reasons. Firstly, these hospitals were quite wealthy, possessing large amounts of land or having being assigned a percentage of taxes from a said source of income. For example, the Annunziata of Naples had over 330 holdings around both the city's countryside and other places in the kingdom, aside from roughly 100 lbs. of salt given to the institution by queen Sancha of Castille yearly, or the 20 gold ounces to be collected from a tax on wine imports if I'm not mistaken. Additionally, people would often donate money, goods or designate the hospital as beneficiary of testament rights, or even "donate" themselves to it, becoming servants named "oblati" ("donated ones") whose belongings would the owned by the Annunziata after their death (and which were exempt from taxation).
Secondly, they were meant as something we may call a "no-profit organization", in which the amount of money coming in and going out had to be balanced out, with little room for a surplus which could be earned by its administrators (which, in the case of Naples and Capua, were all notaries, merchants, lawyers or noblemen). Of course money wouldn't have to be squandered either, or the assistance provided would have collapsed. Thus a good balance of income and expenses had to be maintained, for example through the purchase of houses or shops which could be rented.
As far as I have been able to study concerning the Annunziata of Capua, all the services provided (feeding orphans, nubile girls, providing wet and dry nurses for babies, caring for the sickly, employing migratory workers, offering alms to the poor, even providing forms of low interest banking and loans) have been either free of charge or very, very cheap. An example is a certain guy named Florentine, most likely a foreigner from Tuscany, whom had worked for the Annunziata a whole year behind a regular payment before leaving, thus I believe him being a wanderer or stranded soldier without a job. Similarly, a priest heading north towards Rome was sheltered and fed for free (although I am not sure if this was due to him being a priest or just a pilgrim). The hospital had a dormitory for pilgrims but no mention of costs has been found so far.
I hope this answer can help your inquiry