Are governmental taxes (federal or state) which an entity pays
considered a debt [owed to its government] or is the entity merely
giving the government its share?
U.S. law gives unsecured income tax debts priority over most other unsecured debts.
Certain kinds of taxes (e.g. estate tax debts and property tax debts) are de facto secured debts with the property that is subject to taxation providing collateral for a pre-collection tax lien prior to secured debt), rather than being unsecured debts. U.S. law often does not require a demand for payment which can be implied in law.
However, taxes are usually not considered true debts in the probate process in the U.S. (and hence not required to adhere to the probate claim presentation process in decedent's estates).
There are forms of revenue that are conceptualized as "merely giving the government its share" for legal purposes, but revenues of those types are normally not classified as taxes.
For example, in the U.S. and many other countries, all or many mineral rights are the property of the government, and the government receives royalty payments under leases from the government to mineral exploitation companies that are a share of the revenues or a share of the profits of that company.
Similarly, governments often charge lease or royalty or share cropping amounts for grazing on government land, or farming on government land. In the feudal period, most government revenues were structured in this manner.
And, when almost all housing in Singapore was government owned, a significant source of government revenue was rent charged to people living in government owned housing which was its share of the value generated by this property.
The key point to recognize that is somewhat flawed in the question is that a debt, which is basically another name for an obligation, does not naturally imply a contractual relationship with mutual benefits and obligations. Obligations and debts can be one sided and non-contractual.
For example, a speeding ticket or a fine for public drunkenness is a debt, even though it did not arise as an exchange for something provided by the government in exchange.
Even when a particular types of tax (e.g. FICA payroll taxes in the U.S.) are earmarked for a particular purpose that benefits the person paying the tax (e.g. Social Security and Medicare benefits), a tax isn't something paid in exchange for the benefit received in the same way that, for example, an insurance premium would be.