Yes it's illegal and you should worry about getting into trouble for it. Even if they haven't set up their voicemail and you set it up for them, that's still illegal. A good way to not get arrested for it is to apply all
the rules of pranking you can to it. Mostly don't do it locally and never call them more than once. But no matter what you do, it's illegal and you shouldn't be doing it.
One incident that I heard about from an online friend, which I can't verify, but his story seemed real, is this: He was contacted by the FBI for computer hacking. It had nothing to do with voicemails or answering machines, just actual computer hacking. In the end, they didn't have enough to charge him with, but during their investigation they discovered his YouTube videos where he was calling into Wal-Mart portrait studios and changing the greetings on their machines and probably getting customer info off of them. He left info in the video which let them track it to the Wal-Mart(s) he did it to. The FBI tried their best to get Wal-Mart to press charges against him, but Wal-Mart wasn't interested in pursuing it, so they had to give up.