Zsh, 5454 51 bytes
-3 by ^=
instead of =0^()
.
((n=$#1,l=0^(n**0l^=n**0.5)))
eval '<<<${1:'{0..$n..$l}':$l}'
Shoutouts to eval
jank.
((n=$#1,l=0^(n**0l^=n**0.5))) # the '0^'xor no-opwith xor0 casts n**0.5 to an integer
eval '<<<${1:' ':$l}' # when eval'd, prints a subtring of length l
{0..$n..$l} # brace expansion: {0..4..16} => 0 4 8 12 16
I left in set -x
in the TIO link, scroll down to the debug section to see exactly what happens with the brace expansion.