You're pretty unlikely to suffer any kind of penalty for this. I can't imagine that they're going to hammer a site that offers a UA header when the content doesn't vary on a few pages; you're not trying to actively deceive anyone.
The only time where this might be an issue is if your user-agent shows significantly different copy on page to a search engine user-agent than it did to a browser or mobile user agent and it deemed the Vary header was being abused to do so. That might cause a penalty.
Essentially, work in good faith and never "cloak" any content (I know that's not what you're intending, but just make sure that the search engine spiders aren't being deceived) and you will be fine.