You'd be lucky if they optimize for PC which has essentially the same coding architecture as 360.
Um, no they aren't. Granted, there's similar APIs (DirectX) providing that abstraction layer there, but then again, the PS3 uses OpenGL, which is ALSO used for different PC games as well. That, and the 360's version of DirectX doesn't QUITE line up with DirectX 9.0c on the PC: it's got a few features missing, (as the GPU in the 360 was finalized before DX 9.0c was) but overall, can roughly approximate the same stuff.
The CPUs are entirely different: the Xenon uses the RISC-based PowerPC architecture, contrast to the CISC-based x86 architecture found on both AMD and Intel's PC CPUs. While the old Pentium 4 had SOME similarities in the semantics of its implementation, (both the Xenon and P4 had long, hyper-threaded pipelines with poor branch prediction) many fundamentals were significantly different. Overall, the Xenon, like the Cell, trade off an x86's massive performance in handling varied instructions on-the-fly for cheap and quick math processing. CPU performance can be classified along that spectrum, as math vs. instructions: and the Xenon and PC CPUs take opposite ends.
if a game is a 32bit executable, which the vast majority are, it can only access 2GB of RAM on windows
Actually, this varies depending upon the hardware setup: a 32-bit OS can only access 4GB of
address space. Said space is used for more than just your main RAM, but anything else the CPU would directly address, including input devices (keyboard, mouse, and network input are stored to a buffer that's not part of the RAM, but still use address space) and output devices. Don't forget that the video card's RAM also takes up address space as well. Typically, the amount of address space left over in most 32-bit OSes will be 2.5-3.5GB, mostly dependant on the particular flavor of Windows, (IIRC, 2k, 98/ME and earlier only use up 256-512MB for non-memory purposes, leaving just the video card and main memory to take the rest) and how much video RAM your graphics card has. Yes, that does mean that you can't properly use a pair of 2GB cards (or a dual-GPU 4GB card) in a 32-bit OS whatsoever.
(And FWIW, a 'decent' PC is only about 150% the price of a console these days)
Actually, it's possible to build a decent gaming PC for under <$300 nowadays. At least, if you count out the price of the OS, which does a lot of things the gaming experience isn't gonna need... (alternatively, you could get Linux and WINE for free) Post-rebate, apparently Radeon 5570s have fallen http://www.newegg.com/Product/Product.aspx?Item=N82E16814131342, and will grant a good 2-4 times a 360/PS3's graphics power. Similarly, good gaming-grade CPUs can be had for <$70US, and <$50US for the motherboard.