The SOCI-users mailing list provided me with the answer. Deferred construction of the statement object is required. For example, to make the above work, change it to:
int vals[NUM_VALS];
auto temp = (s.prepare << "INSERT INTO table (c0, c1, c2, ...) VALUES (:c1, :c2, ...)");
for(int i = 0; i < NUM_VALS; ++i)
temp , into(vals[i]);
statement st(temp).execute();