Looks like the seller lied to you all the way around. He knew about the floor and never told you, so he probably knew about the motor as well. I hate people like that.
The car is a real 340 car, but it has a non-numbers 318, right? If you are worried about the insurance, put a 340 in it. It's still going to be a non-matching car. Or get a junk 340 and throw it in the back of your garage and tell the insurance company that you are running the 318 while you rebuild the 340.
The bank will never find out, unless you tell them. Neither will the insurance company unless something happens or unless you tell them. If you tell them that you were just going by what the seller told you (Which you did) and you didn't know any difference, they can't prove any different. You didn't know about it until you actually looked at the numbers.