The only time it will matter is if you get into a crash and someone wants to sue you for damages. Knowing that you were riding illegally will improve their case.
Another reason to ride responsibly.
This is really the main justification for not having an ebike with an assist speed over 20 or 28mph but I don't think there has been a precedent case anyway in the US someone being sued for riding an "illegal" ebike with the claim that it was the reason for the accident. It will be possible for any competent lawyer (yes there are a few) to prove that non-ebikes can achieve speeds much higher than 20/28mph. The bottom line it's the rider that must ride responsibly at all speeds.
Side note: I've ridden over 5,000 miles this past year and have had a few close calls with pedestrians. In every case, it was the pedestrian not paying attention that was the problem. I'd be ringing my bell, slowing down, etc. and they'll just be walking with the heads down and head phones on or texting not paying attention to anything. They have some responsibility as well .... hate to say that maybe a few need to get whacked by a handlebar to get them to pay attention while they are walking on a dual use path.