It's squash, alright, but I couldn't tell you exactly what type. Which is why I'm baffled because I'm a squash fanatic. I currently have spaghetti, butternut, golden nugget and delicata squash in my fridge.
But that one has me a little stumped. However, here is a picture of different winter squashes and there's one there on the table (right behind the banana squash, to its left) that looks pretty similar to yours.
And here is another picture of what looks like an immature version of the kind you have.
But the sites where I'm finding the pics don't say what type of squash is in the picture, unfortunately. I'd say it's a type of pumpkin squash. There are different sizes and colors of pumpkin squashes that are edible.
Me, I'd go ahead and cook it like I would any other squash and see what happens.