Linear regulators dissipate power proportional to the voltage drop from input to output and the current being supplied.
From 12V to 3.3V is a drop of 8.7V, which means at 0.5A you're dissipating \$8.7 \times 0.5 = 4.35W\$ of power as heat, which is way too much. The regulator is thermally overloaded and is probably oscillating in and out of thermal shutdown, which is why you're reading a much lower voltage.
The thermal resistance from junction to air, \$T_{JA}\$, is 80°C/W on the TO-252 package, 90°C/W on the SOT-223 package, and 160°C/W on the SO-8 package. The maximum junction temperature is 125°C. That means you're thermally limited to \$\frac {125 - 25} {80} = 1.25W\$ dissipation at 25°C ambient on the TO-252 package, and less on the other packages. Even at 270mA you'd be pushing the TO-252 into a temperature rise of 190°C above ambient, which is far beyond its maximum spec. It will eventually burn up.
Linear regulators are inefficient, and should only really be used for small voltage drops, e.g. from 5V to 3.3V, or when you only need a little bit of current.
For larger voltage drops you should consider a buck converter instead of a linear regulator. Linear regulators are fine with larger voltage drops if you only need a small amount of current, or if you only have a small voltage drop (e.g. 5V to 3.3V), but for both a large drop and large current at the same time you really want a switching regulator.