Have you looked into wire molding? It is a container you mount on the walls that can hold the wires. If there are no studs in between the tv and the shelf, then you might be able to drill a small hole in the walls and run the wires through that. If there are studs between the locations, that might be pretty tricky.
Is it sheetrock on the walls, plaster or something else? Do you have the paint to match the walls? You *could* cut a small strip in the shelf, push the wires through into the wall, and then patch over it and paint to cover it up. That would be messy, though, especially if you don't know much about drywall repair. A better solution along those lines would be to cut holes in the wall that you could get your fingers in to guide the wires behind the walls, but you would still have some patching to do and it would still require a bigger hole to access any stuf in between.
Let us know what kind of walls you have and we'll try to help. Welcome to the forum!
Tr

y