A money shift sometimes takes a good 10,000km or so before the engine shows obvious issues. Usually the short-term issues make themselves known by loss of torque at high revs, or a slight knocking sound at idle. (similar to a vanos rattle actually.)
If it was *really* bad you'd have some bent valves and a good ol' check engine light.
The other thing that could happen is you mess up your 2nd gear synchros on your transmission, or if your clutch is fairly worn, it could kill it off mighty quick. (you'd be experiencing a slipping clutch).
I don't think it was a good idea to race your buddy after this mis-shift... especialy without performing an oil change. Just in case the over-rev caused any stripping and loose metal particles to be floating in your oil.
The loss of torque you are describing could be a VANOS issue, DISA valve issue, clogged Catalytic converter, etc. Good idea to have the ECU read to see if there are any issues... otherwise just wait and see if anything happens.
Also take it to a good local indy mechanic and have them do a compression test, just for good measure. If there's an issue, it's a lot cheaper to fix it now than later where one small engine issue quickly turns into a complete rebuild.
For the record, as some other members have mentioned--the ECU does not and can not compensate for blown shifts. It will rev-limit if you are accelerating. But if you down shift to 2nd instead of 4th, the engine will immediately spin at the ratio of the tranny and prop shaft as soon as the clutch is re-engaged. The ECU can't, at this point, stop the engine from spinning so quickly, because there's nothing to ECU can do. Even if it were to shut off the engine (starve it of fuel)... as long as the car is travelling at the same speed in 2nd gear, the engine will be spinning faster than it is designed to. The only thing to do at this point is quickly open the clutch again and let the engine slow down to a proper speed.
The only Z4's that will prevent a blown shift are the SMG manual equipped which will not allow a downshift that will over-rev the engine.
Hope this helps, good luck.