(Side-note: maybe I shouldn't have classified this question as "Best Practices"? I can't figure out how to add an actual answer to the question.)
Thanks to @Randommm for the pointer. I adapted this answer to work with multi-line, sometimes indented contents:
subprocess.call([
"vim",
"-c", ":set paste",
"-c", f':exe "normal i{contents}\\<Esc>"',
"-c", ":set nopaste",
filename
])