Com bash ou zsh , você pode obter um número arbitrário de espaços em uma variável com:
printf -v spc %10s
sed -i "s/this is a test/&\n${spc}and so is this/" test_file.txt
Com zsh , você também pode fazer:
sed -i "s/this is a test/&\n${(l:10:)}and so is this/" test_file.txt