Within a single financial year, if I make $500,000 from the stock market and I purchase a rental property with that profit, am I taxed when the property is sold (in a future financial year) or is the property a different asset class and I am still obligated to pay tax on the the stock investment profit?
You are due to pay capital gains tax whenever you sell an asset for a profit.
If you made a profit of $500k on the sale of share you are liable to pay capital gains tax on those profits. If you then use those profits to buy another asset, whether that is more shares or a property, it has nothing to do with the capital gains event created when you sold the first shares.
As I understand it, you are asking whether the $500,000 earned from the stock market can be treated as the same "asset class" as the property purchase, with the implied objective of treating the property purchase as a tax deduction against the stock market gains.
The ATO lists various allowable deductions such as work-related expenses, gifts, superannuation and so on, with each category having its own set of rules.
Unless you can show that your expense is an allowable deduction against the income, you can’t treat the expense as a deduction against the income.
I doubt you’d be able to justify the property purchase as an allowable deduction against stock market gains, but you should consult a qualified financial advisor as there may be property-related deductions you can claim against your rental income.
In the ordinary scheme of things, the property purchase is a capital purchase but it isn't a capital gain or loss until you sell it, so it doesn't affect the tax you need to pay on your stock investment profit.