To simplify the input a bit, we can swap out the percent-encoded character "%3A" for its decoded equivalent, which is a colon, and a perfect legitimate character to use in the URL's path of an http protocol.
The second thing I did in my experimenting was to get rid of the word "Variable", but keep the percent characters. Thus, %Variable%YearAgoDate% would become %%YearAgoDate% (note the two preceding percent characters).
https://www.fastmail.com/mail/Sent/search:after:%%YearAgoDate%+before:%%YearAgoDatePlusOne%/
In your specific example, we don't need to concern ourselves with validating the URL, as your variables contains ISO-formatted dates in the form YYYY-MM-DD, which don't contain any reserved characters that would need encoding after the text tokens have been processed.
If, however, your variables might contain more erratic strings, consider using the Filter action (found under Variables), which has an option to Percent Encode for URL, which will produce a valid URL string with the text tokens processed and encoded correctly.
But, the current URL I've given should be fine to use "as is". (see below)