This indicates that it won't only be limited to music you've downloaded from iTunes:
"Apple will be able to scan customers' digital music libraries in iTunes and quickly mirror their collections on its own servers, say three people briefed on the talks. If the sound quality of a particular song on a user's hard drive isn't good enough, Apple will be able to replace it with a higher-quality version."
For one, Apple already has a record of what you've purchased on iTunes, so they don't need to scan your library on your computer for those tracks. For another, if it only works for music originally downloaded from iTunes then the only reason they'd need to replace a low quality track with a higher quality one is if you still have old tracks from before they switched them all to iTunes Plus. This isn't likely to be significant enough to call it out. It's most likely that this is a reference to tracks you've ripped yourself off of CDs at a low bit rate. It MAY be limited to tracks that at least have metadata indicating that they've been ripped by iTunes, so there's some belief that they've been legitimately ripped off of a customer's CD instead of downloaded. There's no doubt that there's plenty of music being shared that's been ripped by iTunes, but none of the most offensive "scene" releases of music are. (Of course someone's likely to create a tool that'll get around this by updating all your music's metadata, but distribution of that tool will still be small.)
Replacing low quality tracks in a user's library with higher quality ones from the iTunes Store is one reason why Apple would have made sure to make deals with the music labels. The labels would normally see this as a separate "sale" of each track. They simply don't recognize the idea that once you've bought music in one form that you have the right to use it in another form unless you pay for it again. This is why they fought so hard against allowing people to legally rip their own CDs. Fortunately the consumer won on that one, but that's a rare exception.
The labels have already been trying to either shut down or force licensing out of any service that allows you to upload your own music and stream it. Google and Amazon are so large they thought they might be able to get away with it, or at least that they could manage the court costs when they're sued and keep their services running for 3 to 5 years while the lawsuits are drawn out.
Striking a deal with Apple both gives the labels ammunition for licensing demands and/or lawsuits against Google and Amazon, and it gives them hope that a better service from Apple will curb adoption of the Google and Amazon services. With low(er) adoption, Google and Amazon are more likely to settle with the labels because the money they're making on their services will be greatly diminished.
A few final notes:
Obviously if you've got music on your hard drive that isn't available on the iTunes Store, if Apple allows you to use those at all those are going to have to be uploaded over your network connection. Even if someone else has uploaded a higher quality version Apple's rights to replace your files with higher quality ones are surely going to be limited to music they already have a licence to sell.
Next, thanks to the database files iTunes keeps on your hard drive the "scanning" process is actually only going to consist of a single upload of one of those files, rather than actually seeking all over your hard drive for files with the right file extensions. This'll make the initial sync even faster. It won't detect anything that isn't already in your iTunes library, of course. With Apple's flair for integration, though, any new tracks you add to iTunes will certainly be quickly updated in your cloud service. You may need to manually sync, or it might just do it automatically when you add the tracks in iTunes, as long as you have a network connection.
Interestingly, this could allow you to save space locally and still get higher quality music by intentionally ripping something onto your hard drive at a low quality and letting Apple "replace" it in your cloud service with a higher quality version from the iTunes Store.
Finally, as far as pricing I wouldn't be surprised if this is bundled into the price of whatever Apple chooses to call the replacement for MobileMe, e.g. "iCloud."