How can I change the link in comment form “Log in to post a comment”?

the link is called from within comment_form() (/wp-includes/comment-template.php line 1539) :

'must_log_in'          => '<p class="must-log-in">' . sprintf( __( 'You must be <a href="https://wordpress.stackexchange.com/questions/71100/%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',

and uses wp_login_url() (/wp-includes/general-template.php lines 224+) which uses a filter on its return:

 return apply_filters('login_url', $login_url, $redirect);

you might be able to add a filter function to functions.php of your theme, to influence the link;
example:

add_filter( 'link_url', 'wpse_71100_linkchanger');
function wpse_71100_linkchanger( $link ) {
  /*whatever you need to do with the link*/
  return $link;
}