Let’s try again, it’s the code inside the <small> tag that isn’t working via the template.
<li>
<?php if( get_field('hide_single_page') ) { ?>
<?php the_post_thumbnail(); ?>
<?php } else { ?>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?>
<?php } ?>
<div></div>
<span><?php the_title(); ?><br />
<?php foreach( $posts as $post ):
setup_postdata( $post )
?>
<small><?php
$args = [
'orderby' => 'parent',
'order' => 'DESC'
];
$terms = wp_get_object_terms( $post->ID, 'band', $args );
$names = wp_list_pluck( $terms, 'name' );
$output = implode( ', ', $names );
echo $output; ?></small>
<?php endforeach; ?>
</span>
<?php if( get_field('hide_single_page') ) { ?>
<?php } else { ?>
</a>
<?php } ?>
</li>