https://codex.www.ads-software.com/Class_Reference/WP_Query#Time_Parameters
example (this links to the date archive one year ago):
<?php $on_this_day = get_posts('year='.(date('Y')-1).'&monthnum='.date('n').'&day='.date('j'));
if( $on_this_day ) {
echo '<a class="on-this-day" href="'.get_day_link( (date('Y')-1), date('m'), date('d')).'" title="On This Day in '.(date('Y')-1).'">';
echo 'On this day in '.(date('Y')-1);
echo '</a>';
} else {
echo '<span class="on-this-day">'.'On this day in <span>'.(date('Y')-1).'</span></span>';
} ?>
https://codex.www.ads-software.com/Function_Reference/get_day_link
if you want to link to just one (random) post, try and use:
<?php $on_this_day = get_posts('year='.(date('Y')-1).'&monthnum='.date('n').'&day='.date('j').'&posts_per_page=1&orderby=rand');
if( $on_this_day ) {
echo '<a class="on-this-day" href="'.get_permalink( $on_this_day[0]->ID ).'" title="On This Day in '.(date('Y')-1).'">';
echo 'On this day in '.(date('Y')-1);
echo '</a>';
} else {
echo '<span class="on-this-day">'.'On this day in <span>'.(date('Y')-1).'</span></span>';
} ?>
the ‘greying out’ of the year should be possible with css formatting of .on-this-day span { ... }