You wish to install a weatherproof outlet below-grade in a basement egress window well that is prone to flooding. Apply NEC Article 682 which instructs you to determine the electrical datum and install any non-submersible devices at least 2 ft above the datum plane.
For example, suppose a pump fails with the outlet energized. In that case your flood line could reach either the top of the egress window or the top of the egress window well. The electrical datum would be 2 ft above that line and your weatherproof outlet needs to be installed above this plane.
If the sump pump is submersible you will need to install a local disconnect This will need to be no more than 30" from the pump so probably a switch within the weatherproof box.
Consider whether the outlet and pump will impede egress from the basement in an emergency. Can the window be opened from inside? If the pump blocks a portion of the window or well reduce the effective size accordingly and then determine whether the window and well continue to meet local standards for egress. Not every window well must qualify as an egress window but there will need to be at least one that does. See section R310 of the International Residential Code and/or any applicable local codes.