You can use parameter expansion mechanism
shopt -s globstar
for file in **/*foo.bar; do
prefix="${file%.foo*}"
suffix="${file##*.foo}"
mv -v -- "$file" "$prefix$suffix"
done
The `${file%.foo*}` removes matching suffix (leaving only prefix), and `${file#*.foo}` removes prefix (leaving suffix). The double star glob (`**`) is needed to traverse all subdirectories and `setopt -s globstar` allows that glob.