If the URL shortener has an API, maybe you could write a script that keeps a record of every URL passing through it, and then run curl on those records with a cronjob or something.
I’m guessing you use a plain text editor for your notes and want to stick with it, but some note-taking apps, like Bear and Roam automatically hide the URLs in markdown links, so you could keep them as short as their titles. This would bypass the need for a URL shortener.