What is this and why would it be there?

This doesn't sound good...
What's the prognosis? Should this block be used?
I mean looking at that sloppy mess, i would be very very hesitant. I have a fully machined 360 block in the garage that i had $1000 in, that hairline cracked in that same area...and I put some epoxy on it....and couldn't bring myself to use it.

I know its a 340, but unless you find someone to pressure check the hell out of it, I probably couldn't bring myself to use it.

the dangers of a used engine...never know what someone else did to it.

I would say this is what happened verbatim

someone wanted a roller cam engine, so began machining the side without the epoxy on it.
that went ok, so they started on the other side. unaware of core shift
they punched through to a water jacket. and slopped that stuff on there to "fix" it.
and they either abandoned the roller, or got another block and used this one on a flat tappet build at a later time.