This is a very broad question that has many answers based on the type of product. Consumer electronics products will categorically cost less and take a shorter time to bring to market than industrial automation.
It also depends on what your definition is for "developing a hardware product". There are many stages to hardware product development. Getting something to work functionally using rapid prototyping techniques and prototype platforms such as Arduino and sensor / actuator kit will take very little up front investment (e.g. less than $50k). Getting something to a looks-like, works-like level of completion requires a round of product design and engineering is a step function in up front development cost (e.g. a design agency might charge $200-300k or more to help a startup productize, say, a wearable wristband for fitness measurements). Getting the same product to manufacturing intent, and then to the point of being ready for small lot production, would take more investment.
Where you are doing the development and setting up your supply chain can also make a big difference. Shenzhen, China has emerged as a place where hardware companies can iterate on product design very rapidly due to the ready availability of all sorts of components in Huaqiangbei (an electronic supermart where you can buy everything you need to create most common consumer electronics products). The supply chain in South China has also become much more agile in recent years, with MOQ's (minimum order quantities) coming down over time. The cost and time to develop a product up to a looks-like, works-like level of completion can be substantially lower than what it might take in the US. However, not every product is a good fit for this location - for instance, complex mechatronics or delicate medical devices can be developed more effectively in the US due to the talent pool and availability of contract manufacturers with experience building these types of products.
Lastly, the domain in which the product is developed, and whether that domain is highly regulated, makes a huge difference. For example, a medical device that needs to go through FDA 5(10)k will cost a lot more to develop (and take a lot more time) than the same product that is positioned for consumer use - and it is NEVER a great idea to pick the easier path if the end goal does involve the FDA. Any product that requires policy change (e.g. drones) will also take a lot more investment.
If you have a hardware product you are working on, and would like advice on what it would take to bring it to market, the best thing to do is to chat with people who have brought that type of product to market before, in order to get some level of validation in comparable costs.
Special thanks: Martin Trust Centre, MIT
Edit: Javier Rojas, 15/04/20