I haven't been playing as long as you have, but have already had encounters with the motivation issues. The difficult part is that there are so many wonderful pieces to learn that have already been played so beautifully, that in all honesty the great majority of us will never achieve those standards. Therefore, cut yourself some slack and enjoy the ride, as one of the previous commentators advised.
Another option, which I have been exploring and which I believe Lucy above mentioned, is to find a society/group/junior college or whatever where other guitarists meet, and play for and with them. My local junior college has on ongoing class for ensemble classical guitar which has been a really positive experience. I have met others with whom I can "jam," so to speak, and found that some of the classical guitar repertoire has been arranged for duets, trios, etc. It can be a lot of fun, plus the built in motivation due to the responsibility of holding up your end of the performance keeps you focused. One of my favorite forms played on classical guitars is flamenco, and its main attraction is that in its purist form it is an ensemble experience. The player can contribute positively even when they aren't Vicente Amigo. At least it's not a lonely enterprise.
Just my two cents worth,
P de V