Two key issues:
Get the Correct Switch
A DPDT switch switches two inputs to two outputs at the same time. That is needed for certain things. It is not what you need here. You could probably use one side of a DPDT switch. But I would actually use a 3-way switch. "3-way" is a bit of an odd name, presumably for historical reasons. What it actually does (as long as it isn't "smart" - you definitely don't want that here) is switch one common between two other connections. Those connections are referred to as travelers in the context of the common "3-way" usage. But in this situation you can call them "high" and "low".
But there is a complication. You also want off. A standard 3-way switch won't give you that, and many DPDT switches won't give you that either. In searching a little (but an electrical supply house may have a lot more options at much better prices than what I can easily find online), DPDT switches with center off with maintained contact instead of momentary contact were quite expensive.
In the case of a 3-way switch, that's because a 3-way switch is "off" half the time when in normal use, so a separate "off" setting isn't needed. So that means you need a switch which either has three totally separate positions (off, high, low) that you can wire appropriately or a switch with "center off". Searching...and not so easy to find. I found one at Home Depot but it is for a specific product (yes, a fan motor) so it is not clear if it is really a "totally dumb" Off/High/Low switch or if it has some electronic components in it that do "something" to the high vs. low outputs besides simple switching. But it is overpriced at $27 anyway.
Personally, what I would do is use two switches. Then it is incredibly simple. One switch an ordinary on/off and the other a 3-way switch for high/low. For example, this Leviton switch from Home Depot:
The switch with "OFF" is an ordinary switch. Wire it up for on/off.
The other switch is a "3-way" switch. Instead of using it separately, connect the "common" screw to one of the screws on the ordinary switch. The other screws get connected to "high" and "low" on your motor.
Any of the above switches, including your original DPDT switch, needs to be mounted in a junction box. That raises issue # 2 - cord/plug vs. hardwired.
A junction box is normally installed in or on a wall or ceiling. A junction box can also be mounted in an appliance. The key question is whether you want this motor to be movable or not. If this is part of a permanent installation then hardwiring is generally preferred. With plug/cord connection, you need to:
- Install a proper receptacle if you don't have one already in the desired location
- Install a switch in a self-contained junction box. I would highly recommend a steel box - most plastic boxes are designed for installation inside a wall or ceiling, not being moved around with an appliance.
- Connect cord/plug to the switch with a proper clamp/strain relief.
- Connect cable from switch to motor with a proper clamp.
- Possibly mount the junction box to the motor enclosure, depending on design.
With hardwiring, you need to:
- Install a junction box next to where the motor will be installed. If there is no circuit at that location, you will need to add or extend a circuit (same as with a receptacle).
- Install a junction box. I still prefer steel, but any approved box can be used, with types available depending on the type of wall, surface vs. flush-mount, etc.
- Install a switch in the box.
- Connect incoming power to the switch (same as with a receptacle)
- Connect cable from switch to motor with a proper clamp.
Hardwiring removes one point of failure (the receptacle) and some extra work. If the motor is going to sit in one permanent location, hardwiring is almost always the way to go.