In general, it is not recommended to use a medication that has been stored outside of the labeled storage requirements/recommendations set forth by the manufacturer and there are a few reasons for this.
First and foremost, failure to properly follow the storage recommendations can result in products that are no longer as potent as they once were. The freezing of a product that is not intended to be frozen can irreversibly change the properties of a compound, possibly leading to a less therapeutic effect. This is especially true of products that have a high water content, like creams and ointments.
Very often, manufacturers make their storage recommendations based on the studies they have done on the product. More often then not, they do not have appropriate data on temperature excursions and therefore can not appropriately recommend using a product if it has not been stored properly. When cases like this occur, it is usually recommended to contact the manufacturer of the product and provide specific details (lot number, expiration date, estimated length of exposure to temperature excursion) to determine if the product is still okay to use.
In your question, you mention specifically hydrocortisone and an antibiotic ointment. These products typically have a recommendation of storage at USP room temperature (68°F to 77°F with excursions to 59°F and 86°F for no more than 24 hours). Freezing temperatures are of course far outside this range. Due to this, it would be our recommendation to buy new products as both are fairly inexpensive and easily replaceable.
We do want to note that many products that experience temperature excursions are more likely than not to be minimally affected and will still provide a therapeutic benefit... we just don't have the data to show this and thus make a firm recommendation. Similar to expired medications, where the majority of expired drugs still have potency relatively close to their potency at the initial manufacture date, there is a small chance that the products could be negatively impacted and it's important to have products on hand that you are confident in using and that their potency is unaltered.