If you look for clues, the small hole where the wire passes is chipped out where the drill broke thru, and is not charred where it is chipped. Likewise the wires are and ceiling drywall are fine. This tells me it happened prior to all that happening including the pipe that has been painted.
Knowing how long you have lived there is a factor to consider.
My guess is it happened a long time ago and was mostly covered up by some previous owner and never brought up during the sale.
It is likely ok now but I personally would want to investigate more and see how bad it is and how big of an area.
The history would certainly be interesting. But I agree with Bud, given the hole for the Romex isn't charred, this happened a long time ago. From what you're showing it doesn't appear to be structural, just a surface char mainly on the sub-floor and the joists. Does it appear in any other joist bays?