Is choosing an investment by a bank only due to its regulatory capital charge a form of moral hazard?
Wikipedia:  


  In economics, moral hazard occurs when someone increases their exposure to risk when insured.


Investopedia:  


  Moral hazard is idea that a party protected in some way from risk will act differently than if they didn't have that protection. We encounter moral hazard every day—tenured professors becoming indifferent lecturers, people with theft insurance being less vigilant about where they park, salaried salespeople taking long breaks, and so on.


Economics Help:  


  Moral Hazard is the concept that individuals have incentives to alter their behaviour when their risk or bad-decision making is borne by others.


A moral hazard occurs when acting causes the behavior against which you are acting to increase.  

For example, bailing out a bank due to risky loans that the bank took encourages future banks to make riskier loans.  If the loans pan out, they make a lot of money.  If the loans fail, they get a bailout.  A bailout is less harmful than a bankruptcy, so they view it as less of a risk.  The bailout avoids a bankruptcy today, but it puts more companies at risk of bankruptcy tomorrow.  

In your example, you have two equally risky companies (or types of companies).  But the regulations regard one as riskier than the other.  So they encourage investment in one investment over the other.  That's the intended goal of the policy.  It's not a moral hazard if it is encouraging the intended behavior.  

Now, it may be that the policy is misguided and distorts the market in ways that are not intended.  But that is not a moral hazard.  It would only be a moral hazard if the rule were intended to encourage increased investment in A but due to the way it changed the incentives, it actually increased investment in B.