There is likely a better way to do what you are trying to do, but I don’t understand the bigger picture so all I can do it to help you optimize the code that you’ve supplied. For this purpose I would use variable variables.
This code has not been tested
$content_rows = get_field(‘flexible_content’, ‘options’);
for ($i=0; $i<count($content_rows); $i++) {
$row_var = "content_specific_row_{$i};
${$row_var} = $content_rows[$i];
$content_var = "content_sub_field_value_{$i}";
${$content_var} = ${$row_var}['content'];
}