How can I show a flag link only for the "deepest" terms for a field with multiple values using hierarchical select?
Have you tried checking the $level variable? I have never used this module but the fact that there is a variable named $level suggests to me that this could be checked to only apply your flag link to the last 'level'.

edit in relation to comment:

Try this.

function theme_hs_taxonomy_formatter_lineage($variables) {
  $output = '';
  $lineage = $variables['lineage'];
  $separator = theme('hierarchical_select_item_separator');

  // Render each item within a lineage.
  $items = array();
  foreach ($lineage as $level =&gt; $item ) {
    dpm($item);
    $line  = '&lt;span class="lineage-item lineage-item-level-' . $level . '"&gt;';
    $line .= drupal_render($item);
    //this adds a flag link to every term, not just the last term
    if(!count(taxonomy_get_children($item['#options']['entity']-&gt;tid))){
      $line .= flag_create_link('hobbies_and_interests', $item['#options']['entity']-&gt;tid);
    }

    $line .= '&lt;/span&gt;';
    $items[] = $line;
  }
  $output .= implode($separator, $items);
  return $output;
}