The funding of public-service broadcasting in Germany was changed effective 2013-01-01. Under the current rules (Rundfunkbeitragsstaatsvertrag, in German), a monthly fee is to be paid for every single unit of housing (flat or single-family house), unless it is uninhabitated. It is otherwise immaterial how many people live there or whether any of them owns a receiver¹ or not. Certain people are exempt from the broadcasting fee or eligible to a reduced fee; however, in a multi-person housing unit, this only applies if each inhabitant satisfies the criteria for exemption or reduction. The “ARD ZDF Deutschlandradio Beitragsservice”, or Beitragsservice² for short, is the entity tasked with collecting the broadcasting fees.
According to section 2(1) of the Rundfunkbeitragsstaatsvertrag, if a housing unit has multiple inhabitants, they are jointly and severally liable for the broadcasting fee. This means that the Beitragsservice gets to choose which inhabitant they claim the money from; and apparently, in your case, they have chosen you. You, in turn, can claim a proportionate amount of the fee from your flatmates or former flatmates, according to general principles of civil law. This may be difficult in practice, though, if your former flatmates aren’t willing to pay or are hard to reach; enforcing your claim may be time-consuming and costly.
Regarding the announced visit, I can only speculate. One possibility is that the Beitragsservice might want to check whether your flat is really just a single unit of housing; if one of your flatmates, e.g., has a separate entrance, their room might be another unit for which they would have to pay their own broadcasting fee. (Note that Beitragsservice representatives have no special rights; you are never required to invite them in.) A second, more unpleasant possibility is that the matter has already progressed and a bailiff will appear in order to carry out a distraint. (They do have special rights, and it is not a good idea to try and lock them out.) If the letter is indeed from the city administration, that unfortunately hints at the second possibility. In that case, you should definitely see a lawyer, as soon as possible.
¹ Note that under the rules valid until 2012, where it did matter, a computer with Internet access was also considered a radio, termed a “neuartiges Rundfunkgerät” (“novel radio receiver”).
² It used to be known as Gebühreneinzugszentrale, GEZ, an acronym that is still often used informally.