That seems like a good approach. The only optimization I might recommend is to use a LiQL query instead so you can limit the amount of data that needs to be retrieved and processed -- something like this should do the trick:
<#if page.context.thread??>
<#assign query = "SELECT id FROM messages WHERE topic.id = '" + page.context.thread.topicMessage.uniqueId + "' AND is_solution = true" />
<#assign resp = rest("2.0", "/search?q=" + query?url) />
<#assign seqSolutions = []>
<#list resp.data.items as solution>
<#assign seqSolutions = seqSolutions + [solution.id]>
</#list>
<#if (seqSolutions?size gt 0)>
<meta name="solutions" content="${seqSolutions?join(",")}" />
</#if>
</#if>
(I would of course also reccomend that you put in proper error handling for your rest v2 calls, as we write about in the Error handling in FreeMarker with Community API v2 article)
-Doug