Innovation and investment under financial constraints and product market competition