I would have bailed when you missed the flop, didn't get a 4-flush or open-ended, and only have one over.
I don't agree with limping or folding this hand preflop in MP. In fact, you may have wanted to shove preflop here, as it is almost the proper range (I generally want AQs or better for a preflop shove shortstacked).